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

2018-06-27 Thread osstest service owner
flight 124754 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/124754/ Perfect :-) All tests in this flight passed as required version targeted for testing: freebsd f50037fe9555b6bcd7712d3d441c43c6599c9aff baseline version: freebsd 0246611c60e

[Xen-devel] [seabios test] 124749: trouble: blocked/broken

2018-06-27 Thread osstest service owner
flight 124749 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/124749/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386 broken build-amd64-pvops

Re: [Xen-devel] [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-27 Thread Michal Hocko
This is the v2 of RFC based on the feedback I've received so far. The code even compiles as a bonus ;) I haven't runtime tested it yet, mostly because I have no idea how. Any further feedback is highly appreciated of course. --- From ec9a7241bf422b908532c4c33953b0da2655ad05 Mon Sep 17 00:00:00 200

[Xen-devel] [PATCH v3 5/9] x86/vmx: Improvements to LBR MSR handling

2018-06-27 Thread Andrew Cooper
The main purpose of this patch is to only ever insert the LBR MSRs into the guest load/save list once, as a future patch wants to change the behaviour of vmx_add_guest_msr(). The repeated processing of lbr_info and the guests MSR load/save list is redundant, and a guest using LBR itself will have

Re: [Xen-devel] [PATCH 4/6] x86/msr: Clean up the MSR_FEATURE_CONTROL constants

2018-06-27 Thread Jan Beulich
>>> On 26.06.18 at 19:59, wrote: > On 26/06/18 14:18, Andrew Cooper wrote: >> xen/arch/x86/cpu/mwait-idle.c | 4 ++-- > > I forgot to say that this patch as shown may impact the ease of taking > new code from Linux. The diffstat above doesn't suggest this is going to make things more comp

Re: [Xen-devel] [PATCH v3 5/9] x86/vmx: Improvements to LBR MSR handling

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 10:43, wrote: > The main purpose of this patch is to only ever insert the LBR MSRs into the > guest load/save list once, as a future patch wants to change the behaviour of > vmx_add_guest_msr(). > > The repeated processing of lbr_info and the guests MSR load/save list is > redu

[Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Robin Lee
On XenServer 7.1.1, we start a vm with XAPI but attach a block device with xl. We create an empty json config for the vm with the content "{}\n" and then run 'xl block-attach': # xl block-attach 1 phy:/dev/loop0 xvdz w libxl: error: libxl_json.c:950:libxl__json_parse: yajl error: parse error:

Re: [Xen-devel] Xen Project Security Process Whitepaper v1 is ready for community review

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 06:05, wrote: > Right now, we're at a stage where we could probably justify a new release of > 4.6, 4.7, 4.8, 4.9, and 4.10 due to the depth of XSAs contained within that > can't be patched on top of the release archive. 4.7.6 and 4.8.4 are imminent anyway, and 4.9.3 is due i

Re: [Xen-devel] [PATCH V3] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Jan Beulich
>>> On 26.06.18 at 16:21, wrote: > When SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS is set, > vmx_vcpu_update_eptp() __vmwrites() EPTP_INDEX in > altp2m_vcpu_destroy(). This means that when disabling altp2m on a > domain after xc_altp2m_set_vcpu_enable_notify() has been > successfully called, EPTP_INDEX

Re: [Xen-devel] [PATCH v3 5/9] x86/vmx: Improvements to LBR MSR handling

2018-06-27 Thread Andrew Cooper
On 27/06/18 10:12, Jan Beulich wrote: On 27.06.18 at 10:43, wrote: >> The main purpose of this patch is to only ever insert the LBR MSRs into the >> guest load/save list once, as a future patch wants to change the behaviour of >> vmx_add_guest_msr(). >> >> The repeated processing of lbr_info

Re: [Xen-devel] [PATCH v3 5/9] x86/vmx: Improvements to LBR MSR handling

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 11:50, wrote: > On 27/06/18 10:12, Jan Beulich wrote: > On 27.06.18 at 10:43, wrote: >>> The main purpose of this patch is to only ever insert the LBR MSRs into the >>> guest load/save list once, as a future patch wants to change the behaviour > of >>> vmx_add_guest_msr().

Re: [Xen-devel] [PATCH v3 5/9] x86/vmx: Improvements to LBR MSR handling

2018-06-27 Thread Andrew Cooper
On 27/06/18 10:58, Jan Beulich wrote: On 27.06.18 at 11:50, wrote: >> On 27/06/18 10:12, Jan Beulich wrote: >> On 27.06.18 at 10:43, wrote: The main purpose of this patch is to only ever insert the LBR MSRs into the guest load/save list once, as a future patch wants to change t

Re: [Xen-devel] [PATCH V3] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Razvan Cojocaru
On 06/27/2018 12:46 PM, Jan Beulich wrote: On 26.06.18 at 16:21, wrote: >> When SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS is set, >> vmx_vcpu_update_eptp() __vmwrites() EPTP_INDEX in >> altp2m_vcpu_destroy(). This means that when disabling altp2m on a >> domain after xc_altp2m_set_vcpu_enable_not

[Xen-devel] [ovmf test] 124747: trouble: blocked/broken

2018-06-27 Thread osstest service owner
flight 124747 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/124747/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops broken build-i386

Re: [Xen-devel] [PATCH 1/6] x86/msr: Clean up the MSR_EFER constants

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 02:18:13PM +0100, Andrew Cooper wrote: > The bit position constants are only used by the trampoline asm, but the > code is shorter and clearer when using the mask constants. This halves > the number of constants used. > > Consistently use _AC() for the bit constants, and s

Re: [Xen-devel] [PATCH 1/6] x86/msr: Clean up the MSR_EFER constants

2018-06-27 Thread Andrew Cooper
On 27/06/18 11:39, Roger Pau Monné wrote: > On Tue, Jun 26, 2018 at 02:18:13PM +0100, Andrew Cooper wrote: >> The bit position constants are only used by the trampoline asm, but the >> code is shorter and clearer when using the mask constants. This halves >> the number of constants used. >> >> Con

Re: [Xen-devel] [PATCH 2/6] x86/msr: Cleanup of misc constants

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 02:18:14PM +0100, Andrew Cooper wrote: > Begin the process of cleaning up msr-index.h. Order the MSRs at the > head of the file by index, use spaces for indentation, _AC() for bit > positions, and add a comment describing the expected style. Abbreviate > the ARCH_CAPS_* co

Re: [Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 09:13:11AM +, Robin Lee wrote: > On XenServer 7.1.1, we start a vm with XAPI but attach a block device with xl. > We create an empty json config for the vm with the content "{}\n" and then > run 'xl block-attach': > > # xl block-attach 1 phy:/dev/loop0 xvdz w > lib

Re: [Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Robin Lee
On Wed, Jun 27, 2018 at 6:58 PM, Wei Liu wrote: > On Wed, Jun 27, 2018 at 09:13:11AM +, Robin Lee wrote: >> On XenServer 7.1.1, we start a vm with XAPI but attach a block device with >> xl. >> We create an empty json config for the vm with the content "{}\n" and then >> run 'xl block-attach':

Re: [Xen-devel] [PATCH 4/6] x86/msr: Clean up the MSR_FEATURE_CONTROL constants

2018-06-27 Thread Wei Liu
On Tue, Jun 26, 2018 at 02:18:16PM +0100, Andrew Cooper wrote: > The existing bit names are excessively long (45 chars!), and can be trimmed > down substantially. Drop the IA32 prefix and abbreviate FEATURE_CONTROL to > FEAT_CTL. Furthermore, all of these are feature enablement bits, so drop > EN

Re: [Xen-devel] [PATCH 3/6] x86/msr: Clean up the MSR_{PLATFORM_INFO, MISC_FEATURES_ENABLES} constants

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 02:18:15PM +0100, Andrew Cooper wrote: > These MSRs, while being Intel specific, are used to offer virtualised > CPUID faulting support on AMD hardware, so remove the INTEL infix. > > The bit position constants are used by guest_rdmsr(), but the logic can > be expressed usi

Re: [Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Andrew Cooper
On 27/06/18 12:08, Robin Lee wrote: > On Wed, Jun 27, 2018 at 6:58 PM, Wei Liu wrote: >> On Wed, Jun 27, 2018 at 09:13:11AM +, Robin Lee wrote: >>> On XenServer 7.1.1, we start a vm with XAPI but attach a block device with >>> xl. >>> We create an empty json config for the vm with the content

Re: [Xen-devel] [PATCH 4/6] x86/msr: Clean up the MSR_FEATURE_CONTROL constants

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 02:18:16PM +0100, Andrew Cooper wrote: > The existing bit names are excessively long (45 chars!), and can be trimmed > down substantially. Drop the IA32 prefix and abbreviate FEATURE_CONTROL to > FEAT_CTL. Furthermore, all of these are feature enablement bits, so drop > EN

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

2018-06-27 Thread osstest service owner
flight 124757 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/124757/ Perfect :-) All tests in this flight passed as required version targeted for testing: freebsd 6a3794ff6f6ec157f401e5e0c7dec2012ddc3cfc baseline version: freebsd f50037fe955

Re: [Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 07:08:02PM +0800, Robin Lee wrote: > On Wed, Jun 27, 2018 at 6:58 PM, Wei Liu wrote: > > On Wed, Jun 27, 2018 at 09:13:11AM +, Robin Lee wrote: > >> On XenServer 7.1.1, we start a vm with XAPI but attach a block device with > >> xl. > >> We create an empty json config

Re: [Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Robin Lee
On Wed, Jun 27, 2018 at 7:24 PM, Wei Liu wrote: > On Wed, Jun 27, 2018 at 07:08:02PM +0800, Robin Lee wrote: >> On Wed, Jun 27, 2018 at 6:58 PM, Wei Liu wrote: >> > On Wed, Jun 27, 2018 at 09:13:11AM +, Robin Lee wrote: >> >> On XenServer 7.1.1, we start a vm with XAPI but attach a block devi

Re: [Xen-devel] [PATCH V3] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 12:18, wrote: > On 06/27/2018 12:46 PM, Jan Beulich wrote: > On 26.06.18 at 16:21, wrote: >>> When SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS is set, >>> vmx_vcpu_update_eptp() __vmwrites() EPTP_INDEX in >>> altp2m_vcpu_destroy(). This means that when disabling altp2m on a >>> d

[Xen-devel] [PATCH] x86: Address "Bitwise-and with zero CONSTANT_EXPRESSION_RESULT" Coverity issues

2018-06-27 Thread Andrew Cooper
Coverity complains at code which which performs a bitwise and with a constant that happens to be zero. Both _PAGE_GNTTAB and PG_SH_enable may be 0 depending on Kconfig settings. Rearrange the C to test the constant first and short circuit the bitwise and. No functional change. Signed-off-by: An

Re: [Xen-devel] [PATCH] libxl: make sure buffer is null-terminated in libxl_read_file_contents

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 07:37:42PM +0800, Robin Lee wrote: > On Wed, Jun 27, 2018 at 7:24 PM, Wei Liu wrote: > > On Wed, Jun 27, 2018 at 07:08:02PM +0800, Robin Lee wrote: > >> On Wed, Jun 27, 2018 at 6:58 PM, Wei Liu wrote: > >> > On Wed, Jun 27, 2018 at 09:13:11AM +, Robin Lee wrote: > >> >

[Xen-devel] [distros-debian-squeeze test] 74915: trouble: blocked/broken

2018-06-27 Thread Platform Team regression test user
flight 74915 distros-debian-squeeze real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/74915/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-i3

Re: [Xen-devel] [PATCH] x86: Address "Bitwise-and with zero CONSTANT_EXPRESSION_RESULT" Coverity issues

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 14:27, wrote: > Coverity complains at code which which performs a bitwise and with a constant > that happens to be zero. Both _PAGE_GNTTAB and PG_SH_enable may be 0 > depending on Kconfig settings. > > Rearrange the C to test the constant first and short circuit the bitwise an

Re: [Xen-devel] [PATCH RFC] tools/libxl: Switch Arm guest type to PVH

2018-06-27 Thread Wei Liu
On Mon, Jun 25, 2018 at 05:39:12PM +0100, Ian Jackson wrote: > Roger Pau Monné writes ("Re: [PATCH RFC] tools/libxl: Switch Arm guest type > to PVH"): > > IMO I would remove the 'type' option from xl.cfg (so that it's > > basically ignored) in the ARM case and force it internally to PVH (if > > th

[Xen-devel] [PATCH V4] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Razvan Cojocaru
xc_altp2m_set_vcpu_enable_notify() ends up calling altp2m_vcpu_update_vmfunc_ve(), which sets the SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS bit on vmx_secondary_exec_control. A subsequent call to xc_altp2m_set_domain_state(..., false) (i.e. disabling altp2m for the domain) ends up calling altp2m_vcpu_d

Re: [Xen-devel] [PATCH 5/6] x86/msr: Clean up the MSR_APIC_BASE constants

2018-06-27 Thread Wei Liu
On Tue, Jun 26, 2018 at 02:18:17PM +0100, Andrew Cooper wrote: > We currently have MSR_IA32_APICBASE and MSR_IA32_APICBASE_MSR which are > synonymous from a naming point of view, but refer to very different > things. > > Cleave out the handling of MSR_APIC_BASE (0x1b), and rename > MSR_IA32_APICBA

Re: [Xen-devel] [PATCH 6/6] x86/msr: Clean up the x2APIC MSR constants

2018-06-27 Thread Wei Liu
On Tue, Jun 26, 2018 at 02:18:18PM +0100, Andrew Cooper wrote: > The name MSR_IA32_APICBASE_MSR doesn't logically relate to its purpose. > Rename it to MSR_X2APIC_FIRST and introduce a corresponding > MSR_X2APIC_LAST to avoid opencoding the length of the x2APIC MSR range. > > For the specific regi

Re: [Xen-devel] [PATCH 5/6] x86/msr: Clean up the MSR_APIC_BASE constants

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 02:18:17PM +0100, Andrew Cooper wrote: > We currently have MSR_IA32_APICBASE and MSR_IA32_APICBASE_MSR which are > synonymous from a naming point of view, but refer to very different > things. > > Cleave out the handling of MSR_APIC_BASE (0x1b), and rename > MSR_IA32_APICBA

Re: [Xen-devel] [PATCH 7/6] x86/msr: Introduce msr_{set, clear}_bits() helpers

2018-06-27 Thread Wei Liu
On Tue, Jun 26, 2018 at 07:22:44PM +0100, Andrew Cooper wrote: > One reoccuring code pattern is to read an MSR, modify one or more bits, > and write the result back. Introduce helpers for this purpose. > > First, introduce rdmsr_split() and wrmsr_split() which are tiny static inline > wrappers wh

Re: [Xen-devel] [PATCH 5/6] x86/msr: Clean up the MSR_APIC_BASE constants

2018-06-27 Thread Andrew Cooper
On 27/06/18 14:32, Roger Pau Monné wrote: > On Tue, Jun 26, 2018 at 02:18:17PM +0100, Andrew Cooper wrote: >> We currently have MSR_IA32_APICBASE and MSR_IA32_APICBASE_MSR which are >> synonymous from a naming point of view, but refer to very different >> things. >> >> Cleave out the handling of MS

[Xen-devel] [OSSTEST PATCH] crontabs: Run freebsd-master only three times per week

2018-06-27 Thread Ian Jackson
freebsd master seems to update very frequently and our tests are pretty minimal. Right now having a permanent freebsd build test going is probably not a very good use of our resources. CC: Roger Pau Monné Signed-off-by: Ian Jackson --- cr-for-branches | 2 +- crontab | 2 +- 2 files ch

Re: [Xen-devel] [PATCH v2 7/8] tools/tests/depriv: Install depriv-fd-checker in our private libexec directory

2018-06-27 Thread Wei Liu
On Mon, Jun 11, 2018 at 03:13:23PM +0100, Ian Jackson wrote: > osstest is going to want to call it, and should not be expected to > fish it out of the build tree. > > Signed-off-by: Ian Jackson Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@l

Re: [Xen-devel] [PATCH v2 3/8] tools: xencall, xengnttab, xengntshr: Provide access to internal fds

2018-06-27 Thread Wei Liu
On Mon, Jun 11, 2018 at 03:13:19PM +0100, Ian Jackson wrote: > I want this to support my qemu depriv descriptor audit tool. > > Signed-off-by: Ian Jackson > CC: Andrew Cooper With Roger's comment addressed: Acked-by: Wei Liu ___ Xen-devel mailing l

Re: [Xen-devel] [PATCH v2 6/8] tools/tests: Allow a test subdir to have `install' and `uninstall' targets

2018-06-27 Thread Wei Liu
On Mon, Jun 11, 2018 at 03:13:22PM +0100, Ian Jackson wrote: > Signed-off-by: Ian Jackson 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 6/6] x86/msr: Clean up the x2APIC MSR constants

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 02:18:18PM +0100, Andrew Cooper wrote: > The name MSR_IA32_APICBASE_MSR doesn't logically relate to its purpose. > Rename it to MSR_X2APIC_FIRST and introduce a corresponding > MSR_X2APIC_LAST to avoid opencoding the length of the x2APIC MSR range. > > For the specific regi

Re: [Xen-devel] [PATCH v2 5/8] tools/tests/depriv: New test utility for deprivilege auditing

2018-06-27 Thread Wei Liu
On Mon, Jun 11, 2018 at 03:13:21PM +0100, Ian Jackson wrote: > I have chosen to licence this utility as LGPL-v2.1-only, similar to > other LGPL elements of the Xen tools, because it may want to be moved > into or combined with osstest or some other project at some point in > the future, so it wants

[Xen-devel] [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation

2018-06-27 Thread Andrew Cooper
The new data lives in the .topo union, rather than being treated as a single leaf in the basic union. Host data is scanned when filling in the raw policy, but Xen still discards any toolstack settings for now. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Ian Jackson CC: Wei Liu CC: Ro

[Xen-devel] [PATCH 1/2] x86/cpuid: Fix up stale comments

2018-06-27 Thread Andrew Cooper
* There is no legacy path any more. All static information is retrieved in the first pass. * d->arch.cpuids[] doesn't exist any more. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/cpuid.c | 2 +- xen/arch/x86/domctl.c | 5 ++--- 2 fil

Re: [Xen-devel] [PATCH v2 8/8] tools/tests/depriv-fd-checker: Support checking of Linux tun devices

2018-06-27 Thread Wei Liu
On Mon, Jun 11, 2018 at 03:13:24PM +0100, Ian Jackson wrote: > Signed-off-by: Ian Jackson The code looks OK. But I'm not sure how this is supposed to be used. Wei. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/

[Xen-devel] [PATCH 0/2] x86/cpuid: Trivial fixes

2018-06-27 Thread Andrew Cooper
This is some trivial prep work for the main CPUID work. Andrew Cooper (2): x86/cpuid: Fix up stale comments x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation tools/libxc/xc_cpuid_x86.c | 11 ++- xen/arch/x86/cpuid.c| 43 +++

Re: [Xen-devel] [PATCH v2 8/8] tools/tests/depriv-fd-checker: Support checking of Linux tun devices

2018-06-27 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH v2 8/8] tools/tests/depriv-fd-checker: Support checking of Linux tun devices"): > On Mon, Jun 11, 2018 at 03:13:24PM +0100, Ian Jackson wrote: > > Signed-off-by: Ian Jackson > > The code looks OK. But I'm not sure how this is supposed to be used. I'm not sure what yo

[Xen-devel] [seabios test] 124758: trouble: blocked/broken

2018-06-27 Thread osstest service owner
flight 124758 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/124758/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 broken build-i386-pvops

Re: [Xen-devel] [PATCH V2 1/2] xen/altp2m: set access_required properly for all altp2ms

2018-06-27 Thread Wei Liu
On Wed, Jun 13, 2018 at 11:52:18AM +0300, Razvan Cojocaru wrote: > --- > xen/arch/arm/mem_access.c| 5 + > xen/arch/x86/mm/mem_access.c | 18 ++ > xen/arch/x86/mm/p2m.c| 3 ++- > xen/common/domctl.c | 4 ++-- > xen/include/xen/domain.h | 2 ++ > 5 f

Re: [Xen-devel] [PATCH RFC 02/15] xen/arm: move a few guest related #defines to public/arch-arm.h

2018-06-27 Thread Wei Liu
On Wed, Jun 13, 2018 at 03:15:05PM -0700, Stefano Stabellini wrote: > Move a few constants defined by libxl_arm.c to > xen/include/public/arch-arm.h, so that they are together with the other > guest related #defines such as GUEST_GICD_BASE and GUEST_VPL011_SPI. > Also, this way they can be reused b

Re: [Xen-devel] [PATCH 6/6] x86/msr: Clean up the x2APIC MSR constants

2018-06-27 Thread Andrew Cooper
On 27/06/18 14:50, Roger Pau Monné wrote: > On Tue, Jun 26, 2018 at 02:18:18PM +0100, Andrew Cooper wrote: >> The name MSR_IA32_APICBASE_MSR doesn't logically relate to its purpose. >> Rename it to MSR_X2APIC_FIRST and introduce a corresponding >> MSR_X2APIC_LAST to avoid opencoding the length of t

Re: [Xen-devel] [PATCH 7/6] x86/msr: Introduce msr_{set, clear}_bits() helpers

2018-06-27 Thread Roger Pau Monné
On Tue, Jun 26, 2018 at 07:22:44PM +0100, Andrew Cooper wrote: > One reoccuring code pattern is to read an MSR, modify one or more bits, > and write the result back. Introduce helpers for this purpose. > > First, introduce rdmsr_split() and wrmsr_split() which are tiny static inline > wrappers wh

Re: [Xen-devel] [PATCH v3 01/31] libxl_event: Fix DEBUG prints

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 01/31] libxl_event: Fix DEBUG prints"): > The libxl__log() call was missing the domid. > > The macro DBG is using LIBXL__LOG which rely on a "gc". Add a GC where > needed. > > Signed-off-by: Anthony PERARD > Reviewed-by: Wei Liu Acked-by: Ian Jackson ___

Re: [Xen-devel] [PATCH v3 02/31] libxl_qmp: Documentation of the logic of the QMP client

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 02/31] libxl_qmp: Documentation of the logic of the QMP client"): > Signed-off-by: Anthony PERARD > Acked-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xen

Re: [Xen-devel] [PATCH v3 03/31] libxl_qmp: Fix use of DEBUG_RECEIVED

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 03/31] libxl_qmp: Fix use of DEBUG_RECEIVED"): > This patch fix complilation error with #define DEBUG_RECEIVED of the > macro DEBUG_REPORT_RECEIVED. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenp

Re: [Xen-devel] [PATCH v3 04/31] libxl_json: fix build with DEBUG_ANSWER

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 04/31] libxl_json: fix build with DEBUG_ANSWER"): > Signed-off-by: Anthony PERARD Acked-by: Ian Jackson Although, > yajl_gen_get_buf((yajl_ctx)->g, &buf, &len); \ > -LIBXL__LOG(libxl__gc_owner((yajl_ctx)->gc), LIBXL__LOG_DEBUG, > -

Re: [Xen-devel] [PATCH v3 05/31] libxl_qmp: Move the buffer realloc to the same scope level as read

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 05/31] libxl_qmp: Move the buffer realloc to the same scope level as read"): > In qmp_next(), the inner loop should only try to parse messages from > QMP, if there is more than one. > > The handling of the receive buffer ('incomplete'), should be done at the > sa

Re: [Xen-devel] [PATCH v3 06/31] libxl_qmp: Add a warning to not trust QEMU

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 06/31] libxl_qmp: Add a warning to not trust QEMU"): > ... even if it is not the case for the current code. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/

Re: [Xen-devel] [PATCH v3 07/31] libxl_qmp: Learned to send FD through QMP to QEMU

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 07/31] libxl_qmp: Learned to send FD through QMP to QEMU"): > Adding the ability to send a file descriptor from libxl to QEMU via the > QMP interface. This will be use with the "add-fd" QMP command. Do you know which byte of the message the fd should be attached

Re: [Xen-devel] [PATCH 7/6] x86/msr: Introduce msr_{set, clear}_bits() helpers

2018-06-27 Thread Andrew Cooper
On 27/06/18 15:17, Roger Pau Monné wrote: > On Tue, Jun 26, 2018 at 07:22:44PM +0100, Andrew Cooper wrote: >> One reoccuring code pattern is to read an MSR, modify one or more bits, >> and write the result back. Introduce helpers for this purpose. >> >> First, introduce rdmsr_split() and wrmsr_spl

Re: [Xen-devel] [PATCH v3 08/31] libxl_qmp: Have QEMU save its state to a file descriptor

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 08/31] libxl_qmp: Have QEMU save its state to a file descriptor"): > In case QEMU have restricted access to the system, open the file for it, > and QEMU will save its state to this file descritor. Acked-by: Ian Jackson __

Re: [Xen-devel] [PATCH v3 09/31] libxl_qmp: Move struct sockaddr_un variable to qmp_open()

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 09/31] libxl_qmp: Move struct sockaddr_un variable to qmp_open()"): ... > And allow strncpy to use all the space in sun_path. I wasn't able to see in the diff what this entry in the commit message refers to. Thanks, Ian.

Re: [Xen-devel] [PATCH v3 10/31] libxl_qmp: Move buffers to the stack of qmp_next.

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 10/31] libxl_qmp: Move buffers to the stack of qmp_next."): > That buffer is only used locally, and never reuse accross different call > of qmp_next. So remove it form the handler. How big is this buffer ? I think you're moving it from the heap to the stack ? D

[Xen-devel] [PATCH 0/3] libxc/cpuid: minor fixes

2018-06-27 Thread Roger Pau Monne
Hello, This series contain some minor fixes for cpuid header file generation and a couple of fixes for libxc related cpuid functions. Thanks, Roger. Roger Pau Monne (3): x86/cpuid: fix generation of auto cpuid header libxc: fix stale PVH comment libxc: do not return a value from xc_cpuid_p

[Xen-devel] [PATCH 1/3] x86/cpuid: fix generation of auto cpuid header

2018-06-27 Thread Roger Pau Monne
The makefile rule to generate the cpuid-autogen.h header passes the whole list of dependencies to gen-cpuid.py but only the first dependency is actually needed. So far this seems to be harmless. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beu

Re: [Xen-devel] [PATCH v3 11/31] libxl_qmp: Remove unused yajl_ctx form handler

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 11/31] libxl_qmp: Remove unused yajl_ctx form handler"): > Signed-off-by: Anthony PERARD Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/x

[Xen-devel] [PATCH 2/3] libxc: fix stale PVH comment

2018-06-27 Thread Roger Pau Monne
PVHv2 uses the HVM path, not the PV one. Signed-off-by: Roger Pau Monné --- tools/libxc/xc_cpuid_x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index 21537f06f1..364f802c0f 100644 --- a/tools/libxc/xc_cpuid_x8

[Xen-devel] [PATCH 3/3] libxc: do not return a value from xc_cpuid_policy

2018-06-27 Thread Roger Pau Monne
None of the called functions return any errors, so there's no point in returning an int from xc_cpuid_policy. Signed-off-by: Roger Pau Monné --- tools/libxc/xc_cpuid_x86.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_c

Re: [Xen-devel] [PATCH v3 12/31] libxl_json: constify libxl__json_object_to_yajl_gen arguments

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 12/31] libxl_json: constify libxl__json_object_to_yajl_gen arguments"): > Signed-off-by: Anthony PERARD Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mai

Re: [Xen-devel] [PATCH 0/3] libxc/cpuid: minor fixes

2018-06-27 Thread Andrew Cooper
On 27/06/18 15:32, Roger Pau Monne wrote: > Hello, > > This series contain some minor fixes for cpuid header file generation > and a couple of fixes for libxc related cpuid functions. > > Thanks, Roger. > > Roger Pau Monne (3): > x86/cpuid: fix generation of auto cpuid header > libxc: fix stale

Re: [Xen-devel] [PATCH 2/3] libxc: fix stale PVH comment

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 04:32:13PM +0200, Roger Pau Monne wrote: > PVHv2 uses the HVM path, not the PV one. > > Signed-off-by: Roger Pau Monné Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/ma

Re: [Xen-devel] [PATCH 1/3] x86/cpuid: fix generation of auto cpuid header

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 04:32:12PM +0200, Roger Pau Monne wrote: > The makefile rule to generate the cpuid-autogen.h header passes the > whole list of dependencies to gen-cpuid.py but only the first > dependency is actually needed. > > So far this seems to be harmless. > > Signed-off-by: Roger Pa

Re: [Xen-devel] [PATCH v3 13/31] libxl_qmp: Separate QMP message generation from qmp_send_prepare

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 13/31] libxl_qmp: Separate QMP message generation from qmp_send_prepare"): > This new function qmp_prepare_qmp_cmd() can be reuse later when > introducing a different way to communicate with a QMP server, > libxl__ev_qmp. > > Also, add the QMP end of command '\r\

Re: [Xen-devel] Xen Project Security Process Whitepaper v1 is ready for community review

2018-06-27 Thread Steven Haigh
On Wednesday, 27 June 2018 7:19:58 PM AEST Jan Beulich wrote: > >>> On 27.06.18 at 06:05, wrote: > > Right now, we're at a stage where we could probably justify a new release > > of 4.6, 4.7, 4.8, 4.9, and 4.10 due to the depth of XSAs contained within > > that can't be patched on top of the relea

Re: [Xen-devel] [PATCH 3/3] libxc: do not return a value from xc_cpuid_policy

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 04:32:14PM +0200, Roger Pau Monne wrote: > None of the called functions return any errors, so there's no point in > returning an int from xc_cpuid_policy. > > Signed-off-by: Roger Pau Monné What is the plan for this function? I expect it (and its children) to go away soon

Re: [Xen-devel] [PATCH 5/6] x86/msr: Clean up the MSR_APIC_BASE constants

2018-06-27 Thread Andrew Cooper
On 27/06/18 14:35, Andrew Cooper wrote: > On 27/06/18 14:32, Roger Pau Monné wrote: >> On Tue, Jun 26, 2018 at 02:18:17PM +0100, Andrew Cooper wrote: >>> We currently have MSR_IA32_APICBASE and MSR_IA32_APICBASE_MSR which are >>> synonymous from a naming point of view, but refer to very different >

Re: [Xen-devel] [PATCH 1/2] x86/cpuid: Fix up stale comments

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 15:55, wrote: > * There is no legacy path any more. All static information is retrieved in >the first pass. > * d->arch.cpuids[] doesn't exist any more. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich ___ Xen-devel

Re: [Xen-devel] [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 15:55, wrote: > @@ -316,6 +319,33 @@ static void __init calculate_raw_policy(void) > cpuid_count_leaf(7, i, &p->feat.raw[i]); > } > > +if ( p->basic.max_leaf >= 0xb ) > +{ > +union { > +struct cpuid_leaf l; > +struct cp

[Xen-devel] [qemu-mainline test] 124741: trouble: blocked/broken

2018-06-27 Thread osstest service owner
flight 124741 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/124741/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-amd64

Re: [Xen-devel] [PATCH V4] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 15:12, wrote: > xc_altp2m_set_vcpu_enable_notify() ends up calling > altp2m_vcpu_update_vmfunc_ve(), which sets the > SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS bit on > vmx_secondary_exec_control. A subsequent call to > xc_altp2m_set_domain_state(..., false) (i.e. disabling altp2m >

Re: [Xen-devel] [PATCH v3 14/31] libxl_qmp_ev: Introduce libxl__ev_qmp_start() to connect to QMP

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 14/31] libxl_qmp_ev: Introduce libxl__ev_qmp_start() to connect to QMP"): > This is a first patch to implement libxl__ev_qmp, it only connect to the > QMP socket of QEMU and register a callback that does nothing. ... > @@ -503,6 +504,9 @@ struct libxl__ctx { >

Re: [Xen-devel] [PATCH v3 15/31] libxl_qmp_ev: Implement fd callback and read data

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 15/31] libxl_qmp_ev: Implement fd callback and read data"): > First step into taking care of the input from QEMU's QMP socket. For > now, we read data and store them in buffers. How big is this data ? Is all this business with a linked list of buffers really nec

Re: [Xen-devel] [PATCH V4] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Razvan Cojocaru
On 06/27/2018 06:04 PM, Jan Beulich wrote: On 27.06.18 at 15:12, wrote: >> xc_altp2m_set_vcpu_enable_notify() ends up calling >> altp2m_vcpu_update_vmfunc_ve(), which sets the >> SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS bit on >> vmx_secondary_exec_control. A subsequent call to >> xc_altp2m_set_

Re: [Xen-devel] [PATCH V4] x86/altp2m: Fix crash with INVALID_ALTP2M EPTP index

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 17:25, wrote: > On 06/27/2018 06:04 PM, Jan Beulich wrote: > On 27.06.18 at 15:12, wrote: >>> xc_altp2m_set_vcpu_enable_notify() ends up calling >>> altp2m_vcpu_update_vmfunc_ve(), which sets the >>> SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS bit on >>> vmx_secondary_exec_contro

Re: [Xen-devel] [PATCH v3 18/31] libxl_json: libxl__json_object_to_json

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 18/31] libxl_json: libxl__json_object_to_json"): > Allow to generate a JSON string from a libxl__json_object, > usefull for debugging. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenproject.org ht

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

2018-06-27 Thread osstest service owner
flight 124762 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/124762/ Perfect :-) All tests in this flight passed as required version targeted for testing: freebsd 8c919b97c3e3b63937c2607de051992d459d858d baseline version: freebsd 6a3794ff6f6

Re: [Xen-devel] [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation

2018-06-27 Thread Andrew Cooper
On 27/06/18 15:58, Jan Beulich wrote: On 27.06.18 at 15:55, wrote: >> @@ -316,6 +319,33 @@ static void __init calculate_raw_policy(void) >> cpuid_count_leaf(7, i, &p->feat.raw[i]); >> } >> >> +if ( p->basic.max_leaf >= 0xb ) >> +{ >> +union { >> +

Re: [Xen-devel] [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation

2018-06-27 Thread Wei Liu
On Wed, Jun 27, 2018 at 04:58:08PM +0100, Andrew Cooper wrote: > On 27/06/18 15:58, Jan Beulich wrote: > On 27.06.18 at 15:55, wrote: > >> @@ -316,6 +319,33 @@ static void __init calculate_raw_policy(void) > >> cpuid_count_leaf(7, i, &p->feat.raw[i]); > >> } > >> > >> +

Re: [Xen-devel] [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation

2018-06-27 Thread Andrew Cooper
On 27/06/18 17:00, Wei Liu wrote: > On Wed, Jun 27, 2018 at 04:58:08PM +0100, Andrew Cooper wrote: >> On 27/06/18 15:58, Jan Beulich wrote: >> On 27.06.18 at 15:55, wrote: @@ -316,6 +319,33 @@ static void __init calculate_raw_policy(void) cpuid_count_leaf(7, i, &p->feat.

Re: [Xen-devel] [PATCH v3 22/31] libxl_qmp: Simplify qmp_response_type() prototype

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 22/31] libxl_qmp: Simplify qmp_response_type() prototype"): > Remove the libxl__qmp_handler* argument so the function can be reused > later in a different context. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-

Re: [Xen-devel] [PATCH v3 24/31] libxl_qmp_ev: Respond to QMP greeting

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 24/31] libxl_qmp_ev: Respond to QMP greeting"): > Slight change in the infrastructure to allow to send a buffer before any > command that would already been prepared. I'm inclined to think that this would be better done as part of the "connect to qmp" state machi

Re: [Xen-devel] [PATCH v3 26/31] libxl_qmp: Disable beautify for QMP generated cmd

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 26/31] libxl_qmp: Disable beautify for QMP generated cmd"): > There is no need for it. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-

Re: [Xen-devel] [PATCH v3 27/31] libxl_qmp: Implement libxl__qmp_insert_cdrom_ev

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 27/31] libxl_qmp: Implement libxl__qmp_insert_cdrom_ev"): > This function is a reimplementation of libxl__qmp_insert_cdrom() but to be > use with libxl__ev_qmp. Overall, I think what I am missing in much of this is a highly-formal description of the states of the

Re: [Xen-devel] [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation

2018-06-27 Thread Jan Beulich
>>> On 27.06.18 at 17:58, wrote: > On 27/06/18 15:58, Jan Beulich wrote: > On 27.06.18 at 15:55, wrote: >>> @@ -316,6 +319,33 @@ static void __init calculate_raw_policy(void) >>> cpuid_count_leaf(7, i, &p->feat.raw[i]); >>> } >>> >>> +if ( p->basic.max_leaf >= 0xb ) >>

Re: [Xen-devel] [PATCH v3 29/31] libxl_disk: Have libxl_cdrom_insert use libxl__ev_qmp

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 29/31] libxl_disk: Have libxl_cdrom_insert use libxl__ev_qmp"): > So when QEMU is involve, the operation will be asynchrone and will > finish later. This looks roughly plausible, in the sense that if you address my internal API concerns, and make this part fit ag

Re: [Xen-devel] [PATCH v3 30/31] libxl_dm: Pre-open QMP socket for QEMU

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 30/31] libxl_dm: Pre-open QMP socket for QEMU"): > When starting QEMU with dm_restrict=1, pre-open the QMP socket before > exec QEMU. That socket will be usefull to findout if QEMU is ready, and > pre-opening it means that libxl can connect to it without waiting f

Re: [Xen-devel] [PATCH v3 31/31] libxl: QEMU startup sync based on QMP

2018-06-27 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 31/31] libxl: QEMU startup sync based on QMP"): > This is only activated when dm_restrict=1, as explained in the previous > patch "libxl_dm: Pre-open QMP socket for QEMU" ... > @@ -1603,11 +1603,16 @@ struct libxl__spawn_state { > libxl__spawn_confirm_cb *con

[Xen-devel] [ovmf test] 124761: trouble: blocked/broken

2018-06-27 Thread osstest service owner
flight 124761 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/124761/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 broken build-amd64-pvops

  1   2   >