[Xen-devel] [PATCH 0/2] x86: XSA_214 follow-up

2017-05-31 Thread Jan Beulich
Some cleanup the potential for which was recognized while dealing with that security issue. 1: limit page type width 2: don't allow clearing of TF_kernel_mode for other than 64-bit PV Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@li

[Xen-devel] [PATCH] x86/MSI: improve memory usage in struct msi_desc

2017-05-31 Thread Jan Beulich
There's no reason to have both a 4-byte hole and 4 bytes of tail padding. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/msi.h +++ b/xen/include/asm-x86/msi.h @@ -119,10 +119,9 @@ struct msi_desc { }; struct pci_dev *dev; int irq; + int remap_index;

Re: [Xen-devel] [PATCH 1/2] Revert "x86/hvm: disable pkeys for guests in non-paging mode"

2017-05-31 Thread Han, Huaitong
On Fri, 2017-05-26 at 18:03 +0100, Andrew Cooper wrote: > This reverts commit c41e0266dd59ab50b7a153157e9bd2a3ad114b53. > > When determining Access Rights, Protection Keys only take effect when CR4.PKE > it set, and 4-level paging is active. All other circumstances (notibly, 32bit > PAE paging) s

[Xen-devel] [PATCH 0/4] SVM: misc cleanup

2017-05-31 Thread Jan Beulich
1: use VMCB accessors 2: infer type in VMCB_ACCESSORS() 3: clean up svm_vmcb_dump() 4: clean up svm_vmcb_isvalid() Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 1/2] x86: limit page type width

2017-05-31 Thread Jan Beulich
There's no reason to burn 4 bits on page type when we only have 7 types (plus "none") at present. This requires changing one use of PGT_shared_page, which so far assumed that the type is both a power of 2 and the only type with the high bit set. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/m

[Xen-devel] [PATCH 2/2] x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV

2017-05-31 Thread Jan Beulich
The flag is really only meant for those, both HVM and 32-bit PV tell kernel from user mode based on CPL/RPL. Remove the all-question-marks comment and let's be on the safe side here and also suppress clearing for 32-bit PV (this isn't a fast path after all). Signed-off-by: Jan Beulich --- a/xen/

[Xen-devel] [PATCH 0/2] hvm/save: cleanup

2017-05-31 Thread Jan Beulich
1: sanitize DOMCTL_gethvmcontext_partial handling 2: clean up hvm_save_one() Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 1/4] SVM: use VMCB accessors

2017-05-31 Thread Jan Beulich
This is particularly relevant for the SET form, to ensure proper clean bits tracking (albeit in the case here it's benign as CPL and other segment register attributes share a clean bit). Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -653,7 +653,7

[Xen-devel] [PATCH 3/4] SVM: clean up svm_vmcb_dump()

2017-05-31 Thread Jan Beulich
- constify parameter - use accessors - drop stray casts - adjust formatting Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/svm/svmdebug.c +++ b/xen/arch/x86/hvm/svm/svmdebug.c @@ -26,60 +26,52 @@ static void svm_dump_sel(const char *nam name, s->sel, s->attr.bytes, s->limit, s->ba

[Xen-devel] [PATCH 2/4] SVM: infer type in VMCB_ACCESSORS()

2017-05-31 Thread Jan Beulich
Prevent accidental mistakes by not requiring explicit types to be specified in the macro invocations. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -544,51 +544,54 @@ void svm_intercept_msr(struct vcpu *v, u * VMCB accessor func

[Xen-devel] [PATCH 4/4] SVM: clean up svm_vmcb_isvalid()

2017-05-31 Thread Jan Beulich
- correct CR3 and CR4 checks - add vcpu parameter (to include in log messages) and constify vmcb one - use bool/true/false - use accessors - adjust formatting Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/svm/nestedsvm.c +++ b/xen/arch/x86/hvm/svm/nestedsvm.c @@ -658,13 +658,13 @@ static int

[Xen-devel] [PATCH 1/2] HVM: sanitize DOMCTL_gethvmcontext_partial handling

2017-05-31 Thread Jan Beulich
Have the caller indicate its buffer size, provide a means to query the needed size, don't ignore the upper halves of type code and instance, and don't copy partial data. Signed-off-by: Jan Beulich --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -496,6 +496,7 @@ int xc_domain_hvm_g

[Xen-devel] [PATCH 2/2] HVM: clean up hvm_save_one()

2017-05-31 Thread Jan Beulich
Eliminate the for_each_vcpu() loop and the associated local variables, don't override the save handler's return code, and correct formatting. Signed-off-by: Jan Beulich --- a/xen/common/hvm/save.c +++ b/xen/common/hvm/save.c @@ -79,36 +79,27 @@ size_t hvm_save_size(struct domain *d) int hvm_sav

[Xen-devel] [PATCH 0/2] hvmloader: misc adjustments

2017-05-31 Thread Jan Beulich
1: dynamically determine scratch memory range for tests 2: drop pointless objcopy invocation Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v11 07/23] x86: refactor psr: L3 CAT: implement get value flow.

2017-05-31 Thread Yi Sun
On 17-05-30 08:05:02, Jan Beulich wrote: > >>> On 03.05.17 at 10:44, wrote: > > > --- a/xen/arch/x86/psr.c > > +++ b/xen/arch/x86/psr.c > > @@ -476,23 +476,34 @@ static struct psr_socket_info > > *get_socket_info(unsigned int socket) > > return socket_info + socket; > > } > > > > +static

[Xen-devel] [PATCH 1/2] hvmloader: dynamically determine scratch memory range for tests

2017-05-31 Thread Jan Beulich
This re-enables tests on configurations where commit 0d6968635c ("hvmloader: avoid tests when they would clobber used memory") forced them to be skipped. Signed-off-by: Jan Beulich --- a/tools/firmware/hvmloader/tests.c +++ b/tools/firmware/hvmloader/tests.c @@ -29,14 +29,15 @@ /* * Memory

[Xen-devel] [PATCH 2/2] hvmloader: drop pointless objcopy invocation

2017-05-31 Thread Jan Beulich
It doesn't alter the image in any way. Signed-off-by: Jan Beulich --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -84,9 +84,7 @@ vpath static_tables.c $(ACPI_PATH) OBJS += $(ACPI_OBJS) hvmloader: $(OBJS) - $(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR)

Re: [Xen-devel] [PATCH 1/2] Revert "x86/hvm: disable pkeys for guests in non-paging mode"

2017-05-31 Thread Andrew Cooper
On 31/05/2017 08:09, Han, Huaitong wrote: > On Fri, 2017-05-26 at 18:03 +0100, Andrew Cooper wrote: >> This reverts commit c41e0266dd59ab50b7a153157e9bd2a3ad114b53. >> >> When determining Access Rights, Protection Keys only take effect when CR4.PKE >> it set, and 4-level paging is active. All othe

[Xen-devel] [PATCH] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-05-31 Thread Chao Gao
According to SDM Chapter ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER (APIC) -> Extended XAPIC (x2APIC) -> x2APIC State Transitions, The existing code to handle guest's writing MSR_IA32_APICBASE has two flaws: 1. Transition from x2APIC Mode to Disabled Mode is allowed but wrongly disabled currently.

Re: [Xen-devel] [PATCH v11 07/23] x86: refactor psr: L3 CAT: implement get value flow.

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 09:30, wrote: > On 17-05-30 08:05:02, Jan Beulich wrote: >> >>> On 03.05.17 at 10:44, wrote: >> >> > --- a/xen/arch/x86/psr.c >> > +++ b/xen/arch/x86/psr.c >> > @@ -476,23 +476,34 @@ static struct psr_socket_info >> > *get_socket_info(unsigned int socket) >> > return soc

[Xen-devel] [PATCH] smp: assert that all affected CPUs are online in on_selected_cpus()

2017-05-31 Thread Jan Beulich
Signed-off-by: Jan Beulich Suggested-by: Boris Ostrovsky --- a/xen/common/smp.c +++ b/xen/common/smp.c @@ -53,6 +53,7 @@ void on_selected_cpus( unsigned int nr_cpus; ASSERT(local_irq_is_enabled()); +ASSERT(cpumask_subset(selected, &cpu_online_map)); spin_lock(&call_lock);

[Xen-devel] [PATCH] x86: partially undo "fix build with gcc 7"

2017-05-31 Thread Jan Beulich
While f32400e90c ("x86: fix build with gcc 7")'s change to compat_array_access_ok() is necessary, I had blindly and needlessly also added it to array_access_ok(). There's no conditional expression involved there, so undo it. Signed-off-by: Jan Beulich --- No ARM counterpart, as Julien means to re

[Xen-devel] [PATCH] x86/PoD: drop a pointless local variable

2017-05-31 Thread Jan Beulich
... and move another one into a more narrow scope. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/p2m-pod.c +++ b/xen/arch/x86/mm/p2m-pod.c @@ -1180,8 +1180,6 @@ guest_physmap_mark_populate_on_demand(st { struct p2m_domain *p2m = p2m_get_hostp2m(d); unsigned long i, n, pod_count = 0

[Xen-devel] [ovmf baseline-only test] 71461: tolerable FAIL

2017-05-31 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71461 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71461/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): build-amd64-libvirt 5 libvirt-buildfai

Re: [Xen-devel] [PATCH 1/2] Revert "x86/hvm: disable pkeys for guests in non-paging mode"

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 09:44, wrote: > On 31/05/2017 08:09, Han, Huaitong wrote: >> On Fri, 2017-05-26 at 18:03 +0100, Andrew Cooper wrote: >>> This reverts commit c41e0266dd59ab50b7a153157e9bd2a3ad114b53. >>> >>> When determining Access Rights, Protection Keys only take effect when > CR4.PKE >>> it

[Xen-devel] [distros-debian-squeeze test] 71462: tolerable trouble: broken/fail/pass

2017-05-31 Thread Platform Team regression test user
flight 71462 distros-debian-squeeze real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71462/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-i386-squeeze-netboot-pygrub 9 debian-di-install fail like 71418 test-amd64-i

Re: [Xen-devel] [PATCH 1/2] Revert "x86/hvm: disable pkeys for guests in non-paging mode"

2017-05-31 Thread Andrew Cooper
On 31/05/2017 08:56, Jan Beulich wrote: On 31.05.17 at 09:44, wrote: >> On 31/05/2017 08:09, Han, Huaitong wrote: >>> On Fri, 2017-05-26 at 18:03 +0100, Andrew Cooper wrote: This reverts commit c41e0266dd59ab50b7a153157e9bd2a3ad114b53. When determining Access Rights, Protection

Re: [Xen-devel] [PATCH] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 09:46, wrote: > --- a/xen/arch/x86/hvm/vlapic.c > +++ b/xen/arch/x86/hvm/vlapic.c > @@ -1003,14 +1003,12 @@ bool_t vlapic_msr_set(struct vlapic *vlapic, uint64_t > value) > } > else > { > -if ( unlikely(vlapic_x2apic_mode(vlapic)) ) > -

Re: [Xen-devel] [PATCH v11 07/23] x86: refactor psr: L3 CAT: implement get value flow.

2017-05-31 Thread Yi Sun
On 17-05-31 01:45:45, Jan Beulich wrote: > >>> On 31.05.17 at 09:30, wrote: > > On 17-05-30 08:05:02, Jan Beulich wrote: > >> >>> On 03.05.17 at 10:44, wrote: > >> > >> > --- a/xen/arch/x86/psr.c > >> > +++ b/xen/arch/x86/psr.c > >> > @@ -476,23 +476,34 @@ static struct psr_socket_info > >> > *

Re: [Xen-devel] [PATCH v11 07/23] x86: refactor psr: L3 CAT: implement get value flow.

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 10:05, wrote: > On 17-05-31 01:45:45, Jan Beulich wrote: >> >>> On 31.05.17 at 09:30, wrote: >> > On 17-05-30 08:05:02, Jan Beulich wrote: >> >> >>> On 03.05.17 at 10:44, wrote: >> >> >> >> > --- a/xen/arch/x86/psr.c >> >> > +++ b/xen/arch/x86/psr.c >> >> > @@ -476,23 +476,34

Re: [Xen-devel] [PATCH 1/2] Revert "x86/hvm: disable pkeys for guests in non-paging mode"

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 10:06, wrote: > On 31/05/2017 08:56, Jan Beulich wrote: > On 31.05.17 at 09:44, wrote: >>> On 31/05/2017 08:09, Han, Huaitong wrote: On Fri, 2017-05-26 at 18:03 +0100, Andrew Cooper wrote: > This reverts commit c41e0266dd59ab50b7a153157e9bd2a3ad114b53. > >

Re: [Xen-devel] [PATCH 1/2] Revert "x86/hvm: disable pkeys for guests in non-paging mode"

2017-05-31 Thread Han, Huaitong
On Wed, 2017-05-31 at 08:44 +0100, Andrew Cooper wrote: > On 31/05/2017 08:09, Han, Huaitong wrote: > > On Fri, 2017-05-26 at 18:03 +0100, Andrew Cooper wrote: > >> This reverts commit c41e0266dd59ab50b7a153157e9bd2a3ad114b53. > >> > >> When determining Access Rights, Protection Keys only take effe

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

2017-05-31 Thread osstest service owner
flight 109858 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/109858/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt 7 host-ping-check-xen fail REGR. vs. 109656 test-armhf-armhf-xl

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

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

Re: [Xen-devel] [PATCH] xen: stop_machine: fill fn_result only in case of error.

2017-05-31 Thread Jan Beulich
>>> On 30.05.17 at 18:19, wrote: > Since fn_result member is shared across all cpus, it must be filled > only if an error happens. Assume CPU1 detects an error and set fn_result > to -1, then CPU2 doesn't detect an error and set fn_result to 0. The > error detected by CPU1 will be ignored. First

[Xen-devel] AMD Ryzen Support

2017-05-31 Thread Hack
Hi, What about AMD Ryzen iommu Support? Is there any roadmap? ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v3 1/3] xen/string: Clean up {xen, arm}/string.h

2017-05-31 Thread Julien Grall
Hi Andrew, On 05/12/2017 06:35 PM, Andrew Cooper wrote: * Drop __kernel_size_t entirely. It isn't useful distinction, especially as it means the the prototypes don't appear to match their common definitions. * Introduce __HAVE_ARCH_* guards for strpbrk(), strsep() and strspn(), which ma

Re: [Xen-devel] [PATCH for-4.9] x86/mm: Placate DEADCODE Coverity warning

2017-05-31 Thread Julien Grall
Hi, On 05/22/2017 02:32 PM, Jan Beulich wrote: On 22.05.17 at 15:12, wrote: _PAGE_GNTTAB is only used in debug builds of Xen; in release builds, it has the value 0. Coverity complains that "l1e_get_flags(l1e) & 0" is logically dead. Add an extra condition into the logic to skip the flag chec

Re: [Xen-devel] [PATCH] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-05-31 Thread Chao Gao
On Wed, May 31, 2017 at 02:06:50AM -0600, Jan Beulich wrote: On 31.05.17 at 09:46, wrote: >> --- a/xen/arch/x86/hvm/vlapic.c >> +++ b/xen/arch/x86/hvm/vlapic.c >> @@ -1003,14 +1003,12 @@ bool_t vlapic_msr_set(struct vlapic *vlapic, >> uint64_t value) >> } >> else >>

Re: [Xen-devel] AMD Ryzen Support

2017-05-31 Thread Jan Beulich
>>> On 30.05.17 at 13:27, wrote: > What about AMD Ryzen iommu Support? Is there any roadmap? Mind being a little more specific? What features are you looking for? It would, btw, also help if you Cc-ed the maintainer(s) of the code you inquire about. Jan ___

Re: [Xen-devel] [PATCH] x86/HAP: avoid using bogus/misleading locking

2017-05-31 Thread Julien Grall
Hi, On 05/29/2017 02:55 PM, Andrew Cooper wrote: On 29/05/2017 13:37, Jan Beulich wrote: hap_teardown() unconditionally releases the paging lock and is always being called without the lock held: Lock acquire should then be unconditional too. Signed-off-by: Jan Beulich Reviewed-by: Andrew Co

Re: [Xen-devel] [PATCH 2/2] xen/input: add multi-touch support

2017-05-31 Thread Oleksandr Andrushchenko
Hi, Dmitry! On 05/30/2017 07:37 PM, Dmitry Torokhov wrote: On Tue, May 30, 2017 at 03:50:20PM +0300, Oleksandr Andrushchenko wrote: Hi, Dmitry! On 05/30/2017 08:51 AM, Dmitry Torokhov wrote: On Fri, Apr 21, 2017 at 09:40:36AM +0300, Oleksandr Andrushchenko wrote: Hi, Dmitry! On 04/21/2017 0

Re: [Xen-devel] Notes on stubdoms and latency on ARM

2017-05-31 Thread George Dunlap
On 30/05/17 18:29, Stefano Stabellini wrote: > On Fri, 26 May 2017, Volodymyr Babchuk wrote: > The other issue with stubdoms is context switch times. Volodymyr showed > that minios has much higher context switch times compared to EL0 apps. > It is probably due to GIC context switch, tha

Re: [Xen-devel] [PATCH] x86/HAP: avoid using bogus/misleading locking

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 11:03, wrote: > On 05/29/2017 02:55 PM, Andrew Cooper wrote: >> On 29/05/2017 13:37, Jan Beulich wrote: >>> hap_teardown() unconditionally releases the paging lock and is always >>> being called without the lock held: Lock acquire should then be >>> unconditional too. >>> >>> Si

Re: [Xen-devel] [PATCH] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 10:56, wrote: > On Wed, May 31, 2017 at 02:06:50AM -0600, Jan Beulich wrote: > On 31.05.17 at 09:46, wrote: >>> --- a/xen/arch/x86/hvm/vlapic.c >>> +++ b/xen/arch/x86/hvm/vlapic.c >>> @@ -1003,14 +1003,12 @@ bool_t vlapic_msr_set(struct vlapic *vlapic, >>> uint64_t value)

Re: [Xen-devel] [PATCH v7] ns16550: Add support for UART parameters to be specifed with name-value pairs

2017-05-31 Thread Jan Beulich
>>> On 10.05.17 at 18:20, wrote: > Add name=value parsing options for com1 and com2 to add flexibility > in setting register values for MMIO UART devices. > > Maintain backward compatibility with previous positional parameter > specfications. > > eg. com1=115200,8n1,0x3f8,4 > eg. com1=115200,8n1

Re: [Xen-devel] [PATCH v4 for-4.9] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-31 Thread Julien Grall
Hi, On 05/31/2017 07:54 AM, Jan Beulich wrote: On 26.05.17 at 07:20, wrote: Hi Julien, Follow your advice, I change the tag to [PATCH v4 for-4.9] because of we hope this patch can be merged in Xen 4.9. Ping? Sorry for the late reply. I was waiting for staging to re-open before going t

Re: [Xen-devel] [PATCH v7] ns16550: Add support for UART parameters to be specifed with name-value pairs

2017-05-31 Thread Julien Grall
Hi Jan, On 05/31/2017 10:23 AM, Jan Beulich wrote: On 10.05.17 at 18:20, wrote: Add name=value parsing options for com1 and com2 to add flexibility in setting register values for MMIO UART devices. Maintain backward compatibility with previous positional parameter specfications. eg. com1=115

Re: [Xen-devel] [PATCH v11 04/23] x86: refactor psr: L3 CAT: implement main data structures, CPU init and free flows.

2017-05-31 Thread Jan Beulich
>>> On 03.05.17 at 10:44, wrote: > +static void cat_init_feature(const struct cpuid_leaf *regs, > + struct feat_node *feat, > + struct psr_socket_info *info, > + enum psr_feat_type type) > +{ > +/* No valid val

Re: [Xen-devel] [PATCH v11 13/23] x86: refactor psr: CDP: implement CPU init flow.

2017-05-31 Thread Jan Beulich
>>> On 03.05.17 at 10:44, wrote: > @@ -150,11 +151,28 @@ static DEFINE_PER_CPU(struct psr_assoc, psr_assoc); > * array creation. It is used to transiently store a spare node. > */ > static struct feat_node *feat_l3_cat; > +static struct feat_node *feat_l3_cdp; > > /* Common functions */ >

Re: [Xen-devel] [PATCH v11 14/23] x86: refactor psr: CDP: implement get hw info flow.

2017-05-31 Thread Jan Beulich
>>> On 03.05.17 at 10:44, wrote: > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -207,7 +207,9 @@ static void free_socket_resources(unsigned int socket) > memset(info->dom_ids, 0, ((DOMID_IDLE + 1) + 7) / 8); > } > > -static enum psr_feat_type psr_cbm_type_to_feat_type(enum cbm_

Re: [Xen-devel] [PATCH v11 15/23] x86: refactor psr: CDP: implement set value callback function.

2017-05-31 Thread Jan Beulich
>>> On 03.05.17 at 10:44, wrote: > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -352,9 +352,21 @@ static bool l3_cdp_get_feat_info(const struct feat_node > *feat, > return true; > } > > +static void l3_cdp_write_msr(unsigned int cos, uint32_t val, enum cbm_type > type) > +{ >

Re: [Xen-devel] [PATCH v4 for-4.9] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 11:23, wrote: > On 05/31/2017 07:54 AM, Jan Beulich wrote: > On 26.05.17 at 07:20, wrote: >>> Hi Julien, >>> Follow your advice, I change the tag to [PATCH v4 for-4.9] because of we >>> hope this patch can be merged in Xen 4.9. >> >> Ping? > > Sorry for the late reply.

Re: [Xen-devel] [PATCH v2 1/1] xl man page cleanup and fixes

2017-05-31 Thread Wei Liu
On Wed, May 31, 2017 at 08:30:09AM +0200, Armando Vega wrote: > Signed-off-by: Armando Vega > Acked-by: Ian Jackson Acked-by: Wei Liu Applied to staging. There are a lot of trailing white spaces in your patch. I've removed them while committing. Please try to remove those next time. _

Re: [Xen-devel] [PATCH v11 18/23] x86: L2 CAT: implement get value flow.

2017-05-31 Thread Jan Beulich
>>> On 03.05.17 at 10:44, wrote: > This patch implements L2 CAT get value interface in domctl. > > Signed-off-by: Yi Sun Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] xen: stop_machine: fill fn_result only in case of error.

2017-05-31 Thread Gregory Herrero
On Wed, May 31, 2017 at 02:30:29AM -0600, Jan Beulich wrote: > >>> On 30.05.17 at 18:19, wrote: > > Since fn_result member is shared across all cpus, it must be filled > > only if an error happens. Assume CPU1 detects an error and set fn_result > > to -1, then CPU2 doesn't detect an error and set

Re: [Xen-devel] [PATCH] smp: assert that all affected CPUs are online in on_selected_cpus()

2017-05-31 Thread Wei Liu
On Wed, May 31, 2017 at 01:49:58AM -0600, Jan Beulich wrote: > Signed-off-by: Jan Beulich > Suggested-by: Boris Ostrovsky Reviewed-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v11 19/23] x86: L2 CAT: implement set value flow.

2017-05-31 Thread Jan Beulich
>>> On 03.05.17 at 10:44, wrote: > This patch implements L2 CAT set value related callback function > and domctl interface. > > Signed-off-by: Yi Sun Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org

Re: [Xen-devel] [PATCH] x86/MSI: improve memory usage in struct msi_desc

2017-05-31 Thread Andrew Cooper
On 31/05/17 08:06, Jan Beulich wrote: > There's no reason to have both a 4-byte hole and 4 bytes of tail > padding. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-

Re: [Xen-devel] [PATCH 1/2] x86: limit page type width

2017-05-31 Thread Andrew Cooper
On 31/05/17 08:14, Jan Beulich wrote: > There's no reason to burn 4 bits on page type when we only have 7 types > (plus "none") at present. This requires changing one use of > PGT_shared_page, which so far assumed that the type is both a power of > 2 and the only type with the high bit set. > > Sig

Re: [Xen-devel] [RFC PATCH v2 24/25] NUMA: Move CONFIG_NUMA to common Kconfig

2017-05-31 Thread Jan Beulich
>>> On 28.03.17 at 17:53, wrote: > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig > @@ -41,6 +41,10 @@ config HAS_GDBSX > config HAS_IOPORTS > bool > > +config NUMA > + def_bool y > + depends on HAS_PDX What makes necessary this dependency? > --- a/xen/drivers/acpi/Kconfig

Re: [Xen-devel] [RFC PATCH v2 25/25] NUMA: Enable ACPI_NUMA config

2017-05-31 Thread Jan Beulich
>>> On 28.03.17 at 17:53, wrote: > --- a/xen/drivers/acpi/Kconfig > +++ b/xen/drivers/acpi/Kconfig > @@ -4,3 +4,7 @@ config ACPI > > config ACPI_LEGACY_TABLES_LOOKUP > bool > + > +config ACPI_NUMA > + def_bool y > + depends on ACPI && NUMA > --- a/xen/include/asm-x86/config.h > ++

Re: [Xen-devel] [PATCH 1/2] x86: limit page type width

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 12:01, wrote: > On 31/05/17 08:14, Jan Beulich wrote: >> There's no reason to burn 4 bits on page type when we only have 7 types >> (plus "none") at present. This requires changing one use of >> PGT_shared_page, which so far assumed that the type is both a power of >> 2 and the

[Xen-devel] [xen-unstable-coverity test] 109891: all pass - PUSHED

2017-05-31 Thread osstest service owner
flight 109891 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/109891/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen 7b5cb2f18e9b98f930f78b64a0f0a3b45139aa53 baseline version: xen 8768

Re: [Xen-devel] [RFC PATCH v2 24/25] NUMA: Move CONFIG_NUMA to common Kconfig

2017-05-31 Thread Julien Grall
Hi Jan, On 31/05/17 11:04, Jan Beulich wrote: On 28.03.17 at 17:53, wrote: --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -41,6 +41,10 @@ config HAS_GDBSX config HAS_IOPORTS bool +config NUMA + def_bool y + depends on HAS_PDX What makes necessary this dependency?

Re: [Xen-devel] [RFC PATCH v2 01/25] x86: NUMA: Clean up: Drop trailing spaces

2017-05-31 Thread Jan Beulich
>>> On 28.03.17 at 17:53, wrote: > --- a/xen/include/asm-x86/numa.h > +++ b/xen/include/asm-x86/numa.h > @@ -1,4 +1,4 @@ > -#ifndef _ASM_X8664_NUMA_H > +#ifndef _ASM_X8664_NUMA_H > #define _ASM_X8664_NUMA_H 1 > > #include > @@ -12,21 +12,20 @@ extern int srat_rev; > extern nodeid_t cpu

Re: [Xen-devel] [RFC PATCH v2 01/25] x86: NUMA: Clean up: Drop trailing spaces

2017-05-31 Thread Jan Beulich
>>> On 28.03.17 at 17:53, wrote: > @@ -60,20 +53,16 @@ struct node_data { > extern struct node_data node_data[]; > > static inline __attribute__((pure)) nodeid_t phys_to_nid(paddr_t addr) Please also take the opportunity and switch to __attribute_pure__ here. Jan __

Re: [Xen-devel] [PATCH v4 for-4.9] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-31 Thread Julien Grall
On 31/05/17 10:46, Jan Beulich wrote: On 31.05.17 at 11:23, wrote: On 05/31/2017 07:54 AM, Jan Beulich wrote: On 26.05.17 at 07:20, wrote: Hi Julien, Follow your advice, I change the tag to [PATCH v4 for-4.9] because of we hope this patch can be merged in Xen 4.9. Ping? Sorry for t

Re: [Xen-devel] [PATCH for-next] tools/libxc: Drop broken xc_{get, set}_hvm_param() functions

2017-05-31 Thread Wei Liu
On Mon, May 22, 2017 at 12:50:09PM +0100, Andrew Cooper wrote: > xc_{get,set}_hvm_param() are deprecated because they truncate their value > parameter in 32bit builds of libxc, and are therefore unfit for use. > > As there is only a single remaining user, switch that user over to > xc_hvm_param_ge

Re: [Xen-devel] [RFC PATCH v2 02/25] x86: NUMA: Fix datatypes and attributes

2017-05-31 Thread Jan Beulich
>>> On 28.03.17 at 17:53, wrote: > Change u{8,32,64} to uint{8,32,64}_t and bool_t to bool. Oh, I see you do this in a separate patch. Please disregard the respective comments on patch 1 then. > -bool_t numa_off = 0; > +bool numa_off = 0; "false" at the same time (and "true" wherever it is bein

Re: [Xen-devel] [RFC PATCH v2 24/25] NUMA: Move CONFIG_NUMA to common Kconfig

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 12:18, wrote: > On 31/05/17 11:04, Jan Beulich wrote: > On 28.03.17 at 17:53, wrote: >>> --- a/xen/common/Kconfig >>> +++ b/xen/common/Kconfig >>> @@ -41,6 +41,10 @@ config HAS_GDBSX >>> config HAS_IOPORTS >>> bool >>> >>> +config NUMA >>> + def_bool y >>> + depend

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

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

[Xen-devel] [PATCH v2] xen: stop_machine: fill fn_result only in case of error.

2017-05-31 Thread gregory . herrero
From: Gregory Herrero When stop_machine_run() is called with NR_CPUS as last argument, fn_result member must be filled only if an error happens since it is shared across all cpus. Assume CPU1 detects an error and set fn_result to -1, then CPU2 doesn't detect an error and set fn_result to 0. The

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-05-31 Thread Julien Grall
Hi Stefano, On 30/05/17 22:39, Stefano Stabellini wrote: On Tue, 30 May 2017, Julien Grall wrote: Hi Andre, On 26/05/17 18:35, Andre Przywara wrote: When reading the priority value of a virtual interrupt, we were taking the respective rank lock so far. However for forwarded interrupts (Dom0 o

Re: [Xen-devel] [PATCH v10 03/32] ARM: vGIC: move irq_to_pending() calls under the VGIC VCPU lock

2017-05-31 Thread Julien Grall
Hi Stefano, On 30/05/17 22:46, Stefano Stabellini wrote: On Tue, 30 May 2017, Julien Grall wrote On 26/05/17 18:35, Andre Przywara wrote: TBH, I am not a big fan of spreading the mess of vGIC locking when we are going to rework the vGIC and know that this code will not be called for LPIs. I a

Re: [Xen-devel] [PATCH for-next v3 01/22] x86/traps: move privilege instruction emulation code

2017-05-31 Thread Wei Liu
On Tue, May 30, 2017 at 11:55:15PM -0600, Jan Beulich wrote: > >>> On 30.05.17 at 19:30, wrote: > > On 30/05/17 18:27, Wei Liu wrote: > >> On Mon, May 29, 2017 at 09:14:07AM -0600, Jan Beulich wrote: > >> On 18.05.17 at 19:28, wrote: > From 58df816b937dc7a3598de01f053a6030e631057e Mon Se

Re: [Xen-devel] [PATCH v2 0/1] xl man page cleanup and fixes proposal

2017-05-31 Thread Ian Jackson
Armando Vega writes ("[PATCH v2 0/1] xl man page cleanup and fixes proposal"): > thanks for the ack Ian, I'm glad you found it helpful! > I amended the commit message to include my sign-off and Ian's ack. > I'll send a PR on github once I get your okay. Sorry, I confused you by talking about pull

Re: [Xen-devel] [PATCH for-next] tools/libxc: Drop broken xc_{get, set}_hvm_param() functions

2017-05-31 Thread Andrew Cooper
On 31/05/17 11:35, Wei Liu wrote: > On Mon, May 22, 2017 at 12:50:09PM +0100, Andrew Cooper wrote: >> xc_{get,set}_hvm_param() are deprecated because they truncate their value >> parameter in 32bit builds of libxc, and are therefore unfit for use. >> >> As there is only a single remaining user, swi

Re: [Xen-devel] [PATCH for-next v3 01/22] x86/traps: move privilege instruction emulation code

2017-05-31 Thread Andrew Cooper
On 31/05/17 12:01, Wei Liu wrote: > On Tue, May 30, 2017 at 11:55:15PM -0600, Jan Beulich wrote: > On 30.05.17 at 19:30, wrote: >>> On 30/05/17 18:27, Wei Liu wrote: On Mon, May 29, 2017 at 09:14:07AM -0600, Jan Beulich wrote: On 18.05.17 at 19:28, wrote: >> From 58df816b937

Re: [Xen-devel] [PATCH 2/2] x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV

2017-05-31 Thread Andrew Cooper
On 31/05/17 08:15, Jan Beulich wrote: > The flag is really only meant for those, both HVM and 32-bit PV tell > kernel from user mode based on CPL/RPL. Remove the all-question-marks > comment and let's be on the safe side here and also suppress clearing > for 32-bit PV (this isn't a fast path after

Re: [Xen-devel] [PATCH v10 11/32] ARM: GICv3: forward pending LPIs to guests

2017-05-31 Thread Julien Grall
Hi Stefano, On 30/05/17 23:07, Stefano Stabellini wrote: On Tue, 30 May 2017, Julien Grall wrote: }; }; @@ -136,6 +135,80 @@ uint64_t gicv3_get_redist_address(unsigned int cpu, bool use_pta) return per_cpu(lpi_redist, cpu).redist_id << 16; } +static void vgic_vcpu_inject_lpi(s

Re: [Xen-devel] [PATCH for-next v3 06/22] x86/traps: move PV hypercall handlers to pv/traps.c

2017-05-31 Thread Wei Liu
On Tue, May 30, 2017 at 11:59:31PM -0600, Jan Beulich wrote: > >>> On 30.05.17 at 19:40, wrote: > > On 29/05/17 16:40, Jan Beulich wrote: > > On 18.05.17 at 19:09, wrote: > >>> The following handlers are moved: > >>> 1. do_set_trap_table > >> This one makes sense to move to pv/traps.c, but ..

Re: [Xen-devel] [PATCH 1/4] SVM: use VMCB accessors

2017-05-31 Thread Andrew Cooper
On 31/05/17 08:21, Jan Beulich wrote: > This is particularly relevant for the SET form, to ensure proper clean > bits tracking (albeit in the case here it's benign as CPL and other > segment register attributes share a clean bit). > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper __

Re: [Xen-devel] [PATCH v10 26/32] ARM: vITS: handle MOVI command

2017-05-31 Thread Julien Grall
Hi Stefano, On 30/05/17 23:35, Stefano Stabellini wrote: +/* + * TODO: lookup currently-in-guest virtual IRQs and migrate them, + * as the locking may be fragile otherwise. + * This is not easy to do at the moment, but should become easier + * with the introduction of a per-I

Re: [Xen-devel] [PATCH 2/4] SVM: infer type in VMCB_ACCESSORS()

2017-05-31 Thread Andrew Cooper
On 31/05/17 08:21, Jan Beulich wrote: > Prevent accidental mistakes by not requiring explicit types to be > specified in the macro invocations. > > Signed-off-by: Jan Beulich I am not a fan of these accessors being macro-generated; I've lost count of the number of times I've tried greping for one

Re: [Xen-devel] [PATCH] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-05-31 Thread Chao Gao
On Wed, May 31, 2017 at 03:15:28AM -0600, Jan Beulich wrote: On 31.05.17 at 10:56, wrote: >> On Wed, May 31, 2017 at 02:06:50AM -0600, Jan Beulich wrote: >> On 31.05.17 at 09:46, wrote: --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -1003,14 +1003,12 @@

Re: [Xen-devel] [PATCH 3/4] SVM: clean up svm_vmcb_dump()

2017-05-31 Thread Andrew Cooper
On 31/05/17 08:22, Jan Beulich wrote: > - constify parameter > - use accessors > - drop stray casts > - adjust formatting > > Signed-off-by: Jan Beulich Given the const, why switch to using accessors? There are no issues with cleanbits. ~Andrew ___ X

Re: [Xen-devel] [PATCH for-next v3 10/22] x86/traps: delcare percpu softirq_trap

2017-05-31 Thread Wei Liu
On Mon, May 29, 2017 at 09:49:47AM -0600, Jan Beulich wrote: > >>> On 18.05.17 at 19:09, wrote: > > It needs to be non-static when we split PV specific code out. > > I don't follow here: The variable is used by send_guest_trap() to > communicate with its helper nmi_mce_softirq(). How would you >

Re: [Xen-devel] [PATCH for-next v3 01/22] x86/traps: move privilege instruction emulation code

2017-05-31 Thread Wei Liu
On Wed, May 31, 2017 at 12:05:26PM +0100, Andrew Cooper wrote: > On 31/05/17 12:01, Wei Liu wrote: > > On Tue, May 30, 2017 at 11:55:15PM -0600, Jan Beulich wrote: > > On 30.05.17 at 19:30, wrote: > >>> On 30/05/17 18:27, Wei Liu wrote: > On Mon, May 29, 2017 at 09:14:07AM -0600, Jan Beul

Re: [Xen-devel] [PATCH for-next] tools/libxc: Drop broken xc_{get, set}_hvm_param() functions

2017-05-31 Thread Wei Liu
On Wed, May 31, 2017 at 12:02:57PM +0100, Andrew Cooper wrote: > On 31/05/17 11:35, Wei Liu wrote: > > On Mon, May 22, 2017 at 12:50:09PM +0100, Andrew Cooper wrote: > >> xc_{get,set}_hvm_param() are deprecated because they truncate their value > >> parameter in 32bit builds of libxc, and are there

Re: [Xen-devel] [PATCH for-next v3 01/22] x86/traps: move privilege instruction emulation code

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:05, wrote: > On 31/05/17 12:01, Wei Liu wrote: >> On Tue, May 30, 2017 at 11:55:15PM -0600, Jan Beulich wrote: >> On 30.05.17 at 19:30, wrote: On 30/05/17 18:27, Wei Liu wrote: > On Mon, May 29, 2017 at 09:14:07AM -0600, Jan Beulich wrote: > On 18.05.17

Re: [Xen-devel] [PATCH for-next v3 06/22] x86/traps: move PV hypercall handlers to pv/traps.c

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:14, wrote: > On Tue, May 30, 2017 at 11:59:31PM -0600, Jan Beulich wrote: >> >>> On 30.05.17 at 19:40, wrote: >> > On 29/05/17 16:40, Jan Beulich wrote: >> > On 18.05.17 at 19:09, wrote: >> >>> The following handlers are moved: >> >>> 1. do_set_trap_table >> >> This one

Re: [Xen-devel] [PATCH for-next v3 10/22] x86/traps: delcare percpu softirq_trap

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:35, wrote: > On Mon, May 29, 2017 at 09:49:47AM -0600, Jan Beulich wrote: >> >>> On 18.05.17 at 19:09, wrote: >> > It needs to be non-static when we split PV specific code out. >> >> I don't follow here: The variable is used by send_guest_trap() to >> communicate with its h

Re: [Xen-devel] [PATCH] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:34, wrote: > On Wed, May 31, 2017 at 03:15:28AM -0600, Jan Beulich wrote: > On 31.05.17 at 10:56, wrote: >>> On Wed, May 31, 2017 at 02:06:50AM -0600, Jan Beulich wrote: >>> On 31.05.17 at 09:46, wrote: > --- a/xen/arch/x86/hvm/vlapic.c > +++ b/xen/arch/x86/

Re: [Xen-devel] [PATCH for-next v3 10/22] x86/traps: delcare percpu softirq_trap

2017-05-31 Thread Wei Liu
On Wed, May 31, 2017 at 05:46:32AM -0600, Jan Beulich wrote: > >>> On 31.05.17 at 13:35, wrote: > > On Mon, May 29, 2017 at 09:49:47AM -0600, Jan Beulich wrote: > >> >>> On 18.05.17 at 19:09, wrote: > >> > It needs to be non-static when we split PV specific code out. > >> > >> I don't follow her

Re: [Xen-devel] [PATCH 2/2] x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:08, wrote: > On 31/05/17 08:15, Jan Beulich wrote: >> The flag is really only meant for those, both HVM and 32-bit PV tell >> kernel from user mode based on CPL/RPL. Remove the all-question-marks >> comment and let's be on the safe side here and also suppress clearing >> for

Re: [Xen-devel] [PATCH 2/4] SVM: infer type in VMCB_ACCESSORS()

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:25, wrote: > On 31/05/17 08:21, Jan Beulich wrote: >> Prevent accidental mistakes by not requiring explicit types to be >> specified in the macro invocations. >> >> Signed-off-by: Jan Beulich > > I am not a fan of these accessors being macro-generated; I've lost count > of

Re: [Xen-devel] [PATCH 3/4] SVM: clean up svm_vmcb_dump()

2017-05-31 Thread Jan Beulich
>>> On 31.05.17 at 13:34, wrote: > On 31/05/17 08:22, Jan Beulich wrote: >> - constify parameter >> - use accessors >> - drop stray casts >> - adjust formatting >> >> Signed-off-by: Jan Beulich > > Given the const, why switch to using accessors? There are no issues > with cleanbits. I consider

Re: [Xen-devel] [PATCH v2 1/1] xl man page cleanup and fixes

2017-05-31 Thread Armando Vega
I'm not sure I know what you mean, do you mean spaces trailing some of the lines? It could be from how I broke the lines to 80 chars, it kept the spaces between the words at the end, could that be the problem? I can watch out for that in the future. On 05/31/2017 11:46 AM, Wei Liu wrote: > On We

Re: [Xen-devel] [PATCH 1/2] HVM: sanitize DOMCTL_gethvmcontext_partial handling

2017-05-31 Thread Wei Liu
On Wed, May 31, 2017 at 01:24:52AM -0600, Jan Beulich wrote: > Have the caller indicate its buffer size, provide a means to query the > needed size, don't ignore the upper halves of type code and instance, > and don't copy partial data. > > Signed-off-by: Jan Beulich Acked-by: Wei Liu

  1   2   >