Re: [Xen-devel] [PATCH v2 for-4.10] x86: Avoid corruption on migrate for vcpus using CPUID Faulting

2017-11-27 Thread Jan Beulich
to cope with being called in toolstack context. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> With the further intentions mentioned in the description (as a justification for some of the earlier requested changes to not be done), as indicated in a late response to v

Re: [Xen-devel] [PATCH v3 14/17] SUPPORT.md: Add statement on PCI passthrough

2017-11-27 Thread Jan Beulich
>>> On 27.11.17 at 15:48, <george.dun...@citrix.com> wrote: > On 11/23/2017 11:17 AM, Jan Beulich wrote: >>>>> On 22.11.17 at 20:20, <george.dun...@citrix.com> wrote: >>> Signed-off-by: George Dunlap <george.dun...@citrix.com> >> >&g

Re: [Xen-devel] [PATCH v13 10/11] common: add a new mappable resource type: XENMEM_resource_grant_table

2017-11-27 Thread Jan Beulich
mall enough to remain on-stack. > > Signed-off-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH for-4.10] x86: Avoid corruption on migrate for vcpus using CPUID Faulting

2017-11-27 Thread Jan Beulich
>>> On 27.11.17 at 12:37, <andrew.coop...@citrix.com> wrote: > On 27/11/17 09:53, Jan Beulich wrote: >>>>> On 25.11.17 at 19:15, <andrew.coop...@citrix.com> wrote: >>> @@ -1311,10 +1311,49 @@ long arch_do_domctl( >>>

Re: [Xen-devel] [PATCH v2 for-next 4/9] gcov: introduce hooks for the sysctl

2017-11-27 Thread Jan Beulich
>>> On 09.11.17 at 12:13, <roger@citrix.com> wrote: > So that other implementations of the sysctl can be added. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> Acked-by: Jan Beulich <jbeul...@suse.com> __

Re: [Xen-devel] [PATCH v2 for-next 7/9] coverage: introduce support for llvm profiling

2017-11-27 Thread Jan Beulich
>>> On 09.11.17 at 12:13, <roger@citrix.com> wrote: > Introduce the functionality in order to fill the hooks of the > cov_sysctl_ops struct. Note that the functionality is still not wired > into the build system. > > Signed-off-by: Roger Pau Monné <roger@c

Re: [Xen-devel] [PATCH v2 for-next 1/9] kconfig/gcov: remove gcc version choice from kconfig

2017-11-27 Thread Jan Beulich
>>> On 09.11.17 at 12:13, <roger@citrix.com> wrote: > Use autodetect only. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> Acked-by: Jan Beulich <jbeul...@suse.com> ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH v2 for-next 6/9] kconfig/gcov: rename to coverage

2017-11-27 Thread Jan Beulich
>>> On 09.11.17 at 12:13, wrote: > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -115,9 +115,13 @@ subdir-all := $(subdir-y) $(subdir-n) > > $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += > -DINIT_SECTIONS_ONLY > > -ifeq ($(CONFIG_GCOV),y) > +ifeq

Re: [Xen-devel] [PATCH] x86/HVM: fix interaction between internal and extern emulation

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 12:58, <paul.durr...@citrix.com> wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf >> Of Paul Durrant >> Sent: 28 November 2017 11:31 >> To: 'Jan Beulich' <jbeu

Re: [Xen-devel] [PATCH v9 4/5] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v5

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 11:17, <christian.koe...@amd.com> wrote: > Am 28.11.2017 um 10:46 schrieb Jan Beulich: >>>>> On 28.11.17 at 10:12, <christian.koe...@amd.com> wrote: >>> In theory the BIOS would search for address space and won't find >>

Re: [Xen-devel] [PATCH] x86/HVM: fix interaction between internal and extern emulation

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 12:06, wrote: > Yes, it appears that mmio_retry is only set when the underlying emulation > returned X86EMUL_OKAY but not all reps were completed. If the underlying > emulation did not return X86EMUL_RETRY then I can't figure out why >

Re: [Xen-devel] [PATCH v9 4/5] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v5

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 10:12, wrote: > In theory the BIOS would search for address space and won't find > anything, so the hotplug operation should fail even before it reaches > the kernel in the first place. How would the BIOS know what the OS does or plans to do? I

Re: [Xen-devel] [PATCH] x86/HVM: fix interaction between internal and extern emulation

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 10:49, <paul.durr...@citrix.com> wrote: >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 27 November 2017 08:29 >> To: xen-devel <xen-devel@lists.xenproject.org> >> Cc: Julien Grall &l

Re: [Xen-devel] [PATCH] x86/HVM: fix interaction between internal and extern emulation

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 11:05, <paul.durr...@citrix.com> wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 28 November 2017 10:02 >> >>> On 28.11.17 at 10:49, <paul.durr...@citrix.com> wrote: >> >> From: Jan Beulich [

Re: [Xen-devel] [PATCH] x86/HVM: fix interaction between internal and extern emulation

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 11:22, wrote: > It would definitely be good to only reset io_completion when it is clear > that handle_hvm_io_completion() is not going to be called (i.e. for > internally handled I/O) Where would you suggest to do that? These two ... > and perhaps

Re: [Xen-devel] [PATCH] x86/setup: do not relocate below the end of current Xen image placement

2017-11-27 Thread Jan Beulich
>>> On 27.11.17 at 16:41, wrote: > If it is possible we would like to have the Xen image higher than the > booloader put it and certainly do not overwrite the Xen code and data > during copy/relocation. Otherwise the Xen may crash silently at boot. Is this something that

Re: [Xen-devel] [PATCH 3/9] x86/vvmx: Extract operand reading logic into operand_read()

2017-11-27 Thread Jan Beulich
>>> On 26.10.17 at 19:03, wrote: > --- a/xen/arch/x86/hvm/vmx/vvmx.c > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > @@ -361,6 +361,40 @@ static void reg_write(struct cpu_user_regs *regs, > *pval = value; > } > > +static int operand_read(void *buf, struct vmx_inst_op *op, >

Re: [Xen-devel] [PATCH v3 2/4] x86emul: Support vpclmulqdq

2017-11-27 Thread Jan Beulich
>>> On 10.11.17 at 11:36, wrote: > @@ -7672,7 +7673,12 @@ x86_emulate( > host_and_vcpu_must_have(pclmulqdq); > if ( vex.opcx == vex_none ) > goto simd_0f3a_common; > -generate_exception_if(vex.l, EXC_UD); > +if ( !vex.l ) > +

Re: [Xen-devel] [PATCH v3 3/4] x86emul: Support vaes insns

2017-11-27 Thread Jan Beulich
>>> On 10.11.17 at 11:36, wrote: > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++ b/xen/arch/x86/x86_emulate/x86_emulate.c > @@ -1626,6 +1626,7 @@ static bool vcpu_has( > #define vcpu_has_clwb()vcpu_has( 7, EBX, 24, ctxt, ops) > #define vcpu_has_sha()

Re: [Xen-devel] [PATCH v3 1/4] x86emul: Support GFNI insns

2017-11-27 Thread Jan Beulich
>>> On 10.11.17 at 11:36, wrote: > Signed-off-by: Yang Zhong First and foremost - did you try out your own patch? There not being any (minimal) test added makes this at least questionable. > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++

Re: [Xen-devel] [PATCH 4/9] x86/vvmx: Remove unnecessary VMX operand reads

2017-11-27 Thread Jan Beulich
>>> On 26.10.17 at 19:03, wrote: > --- a/xen/arch/x86/hvm/vmx/vvmx.c > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > @@ -1801,7 +1801,7 @@ int nvmx_handle_vmptrst(struct cpu_user_regs *regs) > unsigned long gpa = 0; > int rc; > > -rc = decode_vmx_inst(regs, , , 0);

Re: [Xen-devel] [PATCH v4 1/7] x86/msr: add Raw and Host domain policies

2017-11-28 Thread Jan Beulich
>>> On 18.10.17 at 10:27, wrote: > Raw policy contains the actual values from H/W MSRs. PLATFORM_INFO msr > needs to be read again because probe_intel_cpuid_faulting() records > the presence of X86_FEATURE_CPUID_FAULTING but not the presence of msr > itself (if cpuid

Re: [Xen-devel] [PATCH v4 4/7] x86/msr: add VMX MSRs into HVM_max domain policy

2017-11-28 Thread Jan Beulich
>>> On 18.10.17 at 10:27, wrote: > +static void __init calculate_hvm_max_vmx_policy(struct msr_domain_policy *dp) > +{ > +if ( !cpu_has_vmx ) > +return; > + > +dp->vmx.basic.raw = host_msr_domain_policy.vmx.basic.raw; > + > +dp->vmx.pinbased_ctls.raw

Re: [Xen-devel] [PATCH v4 6/7] x86/msr: update domain policy on CPUID policy changes

2017-11-28 Thread Jan Beulich
>>> On 18.10.17 at 10:27, wrote: > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -124,6 +124,7 @@ static int update_domain_cpuid_info(struct domain *d, > } > > recalculate_cpuid_policy(d); > +recalculate_domain_msr_policy(d); Considering

Re: [Xen-devel] [PATCH] x86/setup: do not relocate below the end of current Xen image placement

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 14:53, <daniel.ki...@oracle.com> wrote: > On Tue, Nov 28, 2017 at 06:37:17AM -0700, Jan Beulich wrote: >> >>> On 28.11.17 at 13:47, <daniel.ki...@oracle.com> wrote: >> > Then all cases should be covered. >> >>

Re: [Xen-devel] [PATCH v4 2/7] x86/msr: add VMX MSRs into struct msr_domain_policy

2017-11-28 Thread Jan Beulich
>>> On 18.10.17 at 10:27, wrote: > New definitions provide a convenient way of accessing contents of > VMX MSRs. They are separated into 5 logical blocks: > > 1. vmx: [VMX_BASIC, VMX_VMCS_ENUM] > 2. VMX_PROCBASED_CTLS2 > 3. VMX_EPT_VPID_CAP > 4.

Re: [Xen-devel] [PATCH v4 7/7] x86/msr: handle VMX MSRs with guest_rd/wrmsr()

2017-11-28 Thread Jan Beulich
>>> On 18.10.17 at 10:27, wrote: > --- a/xen/arch/x86/msr.c > +++ b/xen/arch/x86/msr.c > @@ -360,8 +360,10 @@ int init_vcpu_msr_policy(struct vcpu *v) > > int guest_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val) > { > +const struct domain *d =

Re: [Xen-devel] [PATCH] x86/setup: do not relocate below the end of current Xen image placement

2017-11-28 Thread Jan Beulich
>>> On 28.11.17 at 13:41, <daniel.ki...@oracle.com> wrote: > On Mon, Nov 27, 2017 at 09:51:56AM -0700, Jan Beulich wrote: >> >>> On 27.11.17 at 16:41, <daniel.ki...@oracle.com> wrote: >> > If it is possible we would like to have the Xen image higher

Re: [Xen-devel] [PATCH v4 5/7] x86/cpuid: update signature of hvm_cr4_guest_valid_bits()

2017-11-28 Thread Jan Beulich
truct > domain * instead and update callers. > > Signed-off-by: Sergey Dyasli <sergey.dya...@citrix.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v4 3/7] x86/msr: read VMX MSRs values into Raw policy

2017-11-28 Thread Jan Beulich
>>> On 18.10.17 at 10:27, wrote: > --- a/xen/arch/x86/msr.c > +++ b/xen/arch/x86/msr.c > @@ -32,6 +32,37 @@ struct msr_domain_policy __read_mostly > raw_msr_domain_policy, > struct msr_vcpu_policy __read_mostly hvm_max_msr_vcpu_policy, >

Re: [Xen-devel] MMIO emulation failure on REP OUTS (was: [PATCH] x86/HVM: fix hvmemul_rep_outs_set_context())

2017-11-23 Thread Jan Beulich
(shrinking Cc list) >>> On 23.11.17 at 19:37, <andrew.coop...@citrix.com> wrote: > On 23/11/17 15:09, Jan Beulich wrote: >> There were two issues with this function: Its use of >> hvmemul_do_pio_buffer() was wrong (the function deals only with >> individual p

Re: [Xen-devel] [PATCH v13 06/11] x86/hvm/ioreq: add a new mappable resource type...

2017-11-24 Thread Jan Beulich
mapping privilege over the > guest (which may or may not be limited to the domain running the emulator). > > NOTE: Use of the new resource type is not compatible with use of > XEN_DMOP_get_ioreq_server_info unless the XEN_DMOP_no_gfns flag is > set. > > Signed-off-by

Re: [Xen-devel] [PATCH v3 10/17] SUPPORT.md: Add Debugging, analysis, crash post-portem

2017-11-24 Thread Jan Beulich
>>> On 23.11.17 at 18:08, <george.dun...@citrix.com> wrote: > On 11/23/2017 11:15 AM, Jan Beulich wrote: >>>>> On 22.11.17 at 20:20, <george.dun...@citrix.com> wrote: >>> +## Debugging, analysis, and crash post-mortem >>> + >>>

Re: [Xen-devel] [PATCH v3 16/17] SUPPORT.md: Add limits RFC

2017-11-24 Thread Jan Beulich
>>> On 23.11.17 at 18:21, <george.dun...@citrix.com> wrote: > On 11/23/2017 11:21 AM, Jan Beulich wrote: >>>>> On 22.11.17 at 20:20, <george.dun...@citrix.com> wrote: >>> +### Virtual RAM >>> + >>> +Limit-security, x86 PV 6

Re: [Xen-devel] [PATCH v13 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-11-24 Thread Jan Beulich
>>> On 24.11.17 at 10:36, <paul.durr...@citrix.com> wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 23 November 2017 16:42 >> >>> On 30.10.17 at 18:48, <paul.durr...@citrix.com> wrote: >> > +if ( !paging_mode_transl

Re: [Xen-devel] [PATCH 16/16] SUPPORT.md: Add limits RFC

2017-11-23 Thread Jan Beulich
>>> On 22.11.17 at 19:01, <george.dun...@citrix.com> wrote: > >> On Nov 21, 2017, at 9:26 AM, Jan Beulich <jbeul...@suse.com> wrote: >> >>>>> On 13.11.17 at 16:41, <george.dun...@citrix.com> wrote: >>> +### Virtual CPUs >

Re: [Xen-devel] [PATCH 13/16] SUPPORT.md: Add secondary memory management features

2017-11-23 Thread Jan Beulich
n Jackson <ian.jack...@citrix.com> >>> CC: Wei Liu <wei.l...@citrix.com> >>> CC: Andrew Cooper <andrew.coop...@citrix.com> >>> CC: Jan Beulich <jbeul...@suse.com> >>> CC: Stefano Stabellini <sstabell...@kernel.org> >>> CC: Konrad Wilk <

Re: [Xen-devel] [PATCH v3 02/17] SUPPORT.md: Add core functionality

2017-11-23 Thread Jan Beulich
>>> On 22.11.17 at 20:20, <george.dun...@citrix.com> wrote: > Core memory management and scheduling. > > Signed-off-by: George Dunlap <george.dun...@citrix.com> Acked-by: Jan Beulich <jbeul...@suse.com>

Re: [Xen-devel] [PATCH 12/16] SUPPORT.md: Add Security-releated features

2017-11-23 Thread Jan Beulich
>>> On 22.11.17 at 18:13, <george.dun...@citrix.com> wrote: > On 11/21/2017 08:52 AM, Jan Beulich wrote: >>>>> On 13.11.17 at 16:41, <george.dun...@citrix.com> wrote: >>> With the exception of driver domains, which depend on PCI passthrough, >

Re: [Xen-devel] [PATCH v13 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-11-23 Thread Jan Beulich
on other than > + * the first. > + */ > +rc = (i != 0) ? -EIO : rc; Along the lines of what I've said above, "!=0" could be dropped here, too. I won't insist on the cosmetic remarks to be taken care of, but the return value aspect should be fixed for Reviewed-by: Jan Beulich <jbeul...@suse.com> to apply. Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] XSM: add Kconfig option to override bootloader provided policy

2017-11-29 Thread Jan Beulich
>>> On 28.11.17 at 19:06, wrote: > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig > @@ -140,6 +140,20 @@ config XSM_POLICY > > If unsure, say Y. > > +config XSM_POLICY_OVERRIDE > + bool "Built-in security policy overrides bootloader provided policy" > +

Re: [Xen-devel] [PATCH for-next] x86/traps: Drop redundant printk() in fatal_trap()

2017-11-29 Thread Jan Beulich
(XEN) Faulting linear address: 025ff028 > (XEN) Pagetable walk from 025ff028: > ... > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> ___ Xen-d

Re: [Xen-devel] [PATCH] Use non-debug build for Xen 4.10

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 15:22, <julien.gr...@linaro.org> wrote: > On 11/29/2017 01:29 PM, Jan Beulich wrote: >>>>> On 29.11.17 at 13:09, <julien.gr...@linaro.org> wrote: >>> Modify Config.mk and Kconfig.debug to disable debug by default in &

Re: [Xen-devel] [PATCH] Use non-debug build for Xen 4.10

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 13:09, wrote: > Modify Config.mk and Kconfig.debug to disable debug by default in > preparation for late RCs and eventual release. > > Signed-off-by: Julien Grall > > --- > > I would like this to get included before

Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 16:37, <govinda.ta...@oracle.com> wrote: > On 11/9/2017 2:49 AM, Jan Beulich wrote: >>>>> On 09.11.17 at 00:06, <govinda.ta...@oracle.com> wrote: >>> +static int pcistub_reset_dev(struct pci_dev *dev) >>> +{ >>>

Re: [Xen-devel] [PATCH] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 16:08, <govinda.ta...@oracle.com> wrote: > On 11/9/2017 2:28 AM, Jan Beulich wrote: >>>>> On 08.11.17 at 16:44, <govinda.ta...@oracle.com> wrote: >>> On 11/7/2017 8:40 AM, Jan Beulich wrote: >>>&g

Re: [Xen-devel] [PATCH] XSM: add Kconfig option to override bootloader provided policy

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 16:33, <ta...@tklengyel.com> wrote: > On Wed, Nov 29, 2017 at 1:19 AM, Jan Beulich <jbeul...@suse.com> wrote: >>>>> On 28.11.17 at 19:06, <ta...@tklengyel.com> wrote: >>> --- a/xen/common/Kconfig >>> +++

[Xen-devel] [PATCH v1] core: mount xenfs, ignore proc-xen.mount (#6442, #6662)

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 16:38, wrote: > The detection of ConditionVirtualisation= relies on the presence of > /proc/xen/capabilities. If the file exists and contains the string > "control_d", the running system is a dom0 and VIRTUALIZATION_NONE should > be set. In case /proc/xen

Re: [Xen-devel] [BUG] incorrect goto in gnttab_setup_table overdecrements the preemption counter

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 15:32, wrote: > On 29/11/17 14:23, Jann Horn wrote: >> gnttab_setup_table() has the following code: >> >> = >> static long >> gnttab_setup_table( >> XEN_GUEST_HANDLE_PARAM(gnttab_setup_table_t) uop,

Re: [Xen-devel] [PATCH v1] core: mount xenfs, ignore proc-xen.mount (#6442, #6662)

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 17:07, <o...@aepfle.de> wrote: > On Wed, Nov 29, Jan Beulich wrote: > >> But in the description you talk about detect_vm() - by its name that >> doesn't look to care about Dom0, but whether running on top of >> _some_

Re: [Xen-devel] [PATCH] libxl: put RSDP for PVH guest near 4GB

2017-11-29 Thread Jan Beulich
>>> On 29.11.17 at 15:13, wrote: > --- a/tools/libxl/libxl_x86_acpi.c > +++ b/tools/libxl/libxl_x86_acpi.c > @@ -23,7 +23,6 @@ > /* Number of pages holding ACPI tables */ > #define NUM_ACPI_PAGES 16 > /* Store RSDP in the last 64 bytes of BIOS RO memory */ > -#define

[Xen-devel] [PATCH] x86/mm: drop bogus assertion

2017-11-30 Thread Jan Beulich
aepfle.de> Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1338,12 +1338,8 @@ static int fixup_page_fault(unsigned lon */ if ( paging_mode_enabled(d) && !paging_mode_external(d) ) { -int ret; +i

Re: [Xen-devel] [PATCH] x86/mm: drop bogus assertion

2017-11-30 Thread Jan Beulich
>>> On 30.11.17 at 10:10, wrote: > Olaf has observed this assertion to trigger after an aborted migration > of a PV guest (it remains to be determined why there is a page fault in > the first place here: > > (XEN) Xen call trace: > (XEN)[] do_page_fault+0x39f/0x55c > (XEN)

[Xen-devel] [PATCH] x86/HVM: fix interaction between internal and extern emulation

2017-11-27 Thread Jan Beulich
ing the adjustment to handle_pio() isn't needed. Do it nevertheless for consistency as well as to avoid the lack thereof becoming an issue in the future; put the main change in generic enough a place to also cover VMX real mode emulation. Reported-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-of

[Xen-devel] [PATCH 0/3] XENMEM_add_to_physmap handling adjustments

2017-11-27 Thread Jan Beulich
ASSERT() in xenmem_add_to_physmap_one() 2: x86: check paging mode earlier in xenmem_add_to_physmap_one() 3: improve XENMEM_add_to_physmap_batch address checking Signed-off-by: Jan Beulich <jbeul...@suse.com> ___ Xen-devel mailing list Xen

[Xen-devel] [PATCH 2/3] x86: check paging mode earlier in xenmem_add_to_physmap_one()

2017-11-27 Thread Jan Beulich
There's no point in deferring this until after some initial processing, and it's actively wrong for the XENMAPSPACE_gmfn_foreign handling to not have such a check at all. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4081,6 +4081,9

[Xen-devel] [PATCH 3/3] improve XENMEM_add_to_physmap_batch address checking

2017-11-27 Thread Jan Beulich
rity issue in this case because of the limited width of struct xen_add_to_physmap_batch's size field: It being 16-bits wide, only the r/o M2P area can be accessed. Still we can and should do better. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/common/memory.c +++ b/xen/common/memory.c @

[Xen-devel] [PATCH 1/3] x86: replace bad ASSERT() in xenmem_add_to_physmap_one()

2017-11-27 Thread Jan Beulich
There are no locks being held, i.e. it is possible to be triggered by racy hypercall invocations. Subsequent code doesn't really depend on the checked values, so this is not a security issue. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- I'm up for to better suggestions for the EXDE

Re: [Xen-devel] [PATCH] x86/setup: do not relocate below the end of current Xen image placement

2017-11-27 Thread Jan Beulich
>>> On 27.11.17 at 17:58, wrote: > On 27/11/17 15:41, Daniel Kiper wrote: >> If it is possible we would like to have the Xen image higher than the >> booloader put it and certainly do not overwrite the Xen code and data >> during copy/relocation. Otherwise the Xen may

Re: [Xen-devel] [PATCH] x86/setup: do not relocate below the end of current Xen image placement

2017-11-27 Thread Jan Beulich
>>> On 27.11.17 at 20:54, wrote: > If the user decides to put the kexec crashkernel in the same > area (so at the end of the E820_RAM) the relocation routines > go haywire. For example with " crashkernel=512M@3327M" > > we would be usurping the end of

Re: [Xen-devel] [PATCH 3/9] x86/vvmx: Extract operand reading logic into operand_read()

2017-11-28 Thread Jan Beulich
>>> On 26.10.17 at 19:03, wrote: > +static int operand_read(void *buf, struct vmx_inst_op *op, > +struct cpu_user_regs *regs, unsigned int bytes) const (twice) > +{ > +if ( op->type == VMX_INST_MEMREG_TYPE_REG ) > +{ > +switch (

Re: [Xen-devel] [PATCH 7/9] x86/vvmx: Use correct sizes when reading operands

2017-11-28 Thread Jan Beulich
>>> On 26.10.17 at 19:03, wrote: > * invvpid has a 128-bit memory operand but we only require the VPID value > which lies in the lower 64 bits. The memory operand (wrongly) isn't being read at all - I don't understand the above bullet point for that reason. > @@ -464,6

Re: [Xen-devel] gcc version used by developers

2017-11-27 Thread Jan Beulich
>>> On 27.11.17 at 20:43, wrote: > what version of gcc do Xen developers use for Xen? Is gcc 5.4 or 6.4 safe > to use? I think it's the other way around - if you find issues with any gcc version new enough for the build process to not bail out, and which aren't described

Re: [Xen-devel] [PATCH 3/9] x86/vvmx: Extract operand reading logic into operand_read()

2017-11-28 Thread Jan Beulich
>>> On 27.11.17 at 19:08, <andrew.coop...@citrix.com> wrote: > On 27/11/17 17:01, Jan Beulich wrote: >>>>> On 26.10.17 at 19:03, <euan.har...@citrix.com> wrote: >>> +return X86EMUL_OKAY; >> This and ... >> >>>

Re: [Xen-devel] [PATCH 9/9] x86/vvmx: Use hvm_copy_{to, from}_guest_virt() to read operands

2017-11-28 Thread Jan Beulich
>>> On 26.10.17 at 19:03, wrote: In the title please use "read/write" or "access". > @@ -380,17 +383,7 @@ static int operand_read(void *buf, struct vmx_inst_op > *op, > return X86EMUL_OKAY; > } > else > -{ > -pagefault_info_t pfinfo; > -

Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-30 Thread Jan Beulich
>>> On 29.11.17 at 18:38, wrote: >>> In the case of bus or slot reset, our goal is to reset connected PCIe >>> fabric/card/endpoint. >>> The connected card/endpoint can be multi-function device. So, same >>> walk-through and checking >>> is needed irrespective of type of

Re: [Xen-devel] [PATCH] x86/setup: do not relocate below the end of current Xen image placement

2017-11-30 Thread Jan Beulich
>>> On 29.11.17 at 19:56, <daniel.ki...@oracle.com> wrote: > On Tue, Nov 28, 2017 at 07:28:25AM -0700, Jan Beulich wrote: >> Another option is to consider not moving Xen based on other >> criteria: The main goal here is to free up memory below 16Mb. If >>

Re: [Xen-devel] [PATCH] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-30 Thread Jan Beulich
>>> On 29.11.17 at 20:44, wrote: > So, we will use the following sequence to reset the requested > device/function. > > - FLR (as first option) > - BUS/SLOT reset (as fall-back option) if FLR is not supported or any > issue with FLR It looks to me as if the slot

Re: [Xen-devel] [PATCH v1] core: mount xenfs, ignore proc-xen.mount (#6442, #6662)

2017-11-30 Thread Jan Beulich
>>> On 30.11.17 at 09:23, <o...@aepfle.de> wrote: > On Wed, Nov 29, Jan Beulich wrote: > >> Ah, I see. But then still I don't see why at least on half way >> recent Xen /sys/hypervisor/properties/features wouldn't have >> the information you're after

Re: [Xen-devel] [PATCH] x86/mm: drop bogus assertion

2017-11-30 Thread Jan Beulich
>>> On 30.11.17 at 12:33, <andrew.coop...@citrix.com> wrote: > On 30/11/17 09:10, Jan Beulich wrote: >> Olaf has observed this assertion to trigger after an aborted migration >> of a PV guest (it remains to be determined why there is a page fault in >> the fi

[Xen-devel] [PATCH 0/2] gnttab: improve GNTTABOP_cache_flush handling

2017-11-30 Thread Jan Beulich
1: correct GNTTABOP_cache_flush empty batch handling 2: improve GNTTABOP_cache_flush locking Compile tested only, as this is being used by ARM only. I'd therefore appreciate an ARM person to take a close look and/or try it out. Signed-off-by: Jan Beulich <jbeul...@suse.

Re: [Xen-devel] [PATCH v2] x86/hvm: fix interaction between internal and external emulation

2017-11-30 Thread Jan Beulich
y: Andrew Cooper <andrew.coop...@citrix.com> > Signed-off-by: Paul Durrant <paul.durr...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com> Hmm, I notice Paul didn't Cc you on this one - despite it getting late, this is still something to

[Xen-devel] [PATCH 1/2] gnttab: correct GNTTABOP_cache_flush empty batch handling

2017-11-30 Thread Jan Beulich
the order of argument checks: We shouldn't accept zero-length elements with unknown bits set in "op". Also constify cache_flush()'s first parameter. Reported-by: Jann Horn <ja...@google.com> Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/common/grant_table.c +++ b/xe

[Xen-devel] [PATCH 2/2] gnttab: improve GNTTABOP_cache_flush locking

2017-11-30 Thread Jan Beulich
Dropping the lock before returning from grant_map_exists() means handing possibly stale information back to the caller. Return back the pointer to the active entry instead, for the caller to release the lock once done. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/common/grant_t

Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-30 Thread Jan Beulich
>>> On 30.11.17 at 15:15, <govinda.ta...@oracle.com> wrote: > On 11/30/2017 2:27 AM, Jan Beulich wrote: >>>>> On 29.11.17 at 18:38, <govinda.ta...@oracle.com> wrote: >>>>> In the case of bus or slot reset, our goal is to reset connected PCI

Re: [Xen-devel] [PATCH 1/3] x86/PoD: correctly handle non-order-0 decrease-reservation requests

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 16:58, <andrew.coop...@citrix.com> wrote: > On 04/12/17 11:06, Jan Beulich wrote: >> --- a/xen/common/memory.c >> +++ b/xen/common/memory.c >> @@ -284,13 +284,15 @@ int guest_remove_page(struct domain *d, >> >> #ifde

Re: [Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-12-05 Thread Jan Beulich
>>> On 04.12.17 at 16:45, wrote: >> On Fri, Oct 13, 2017 at 03:50:57PM +0300, Alexandru Isaila wrote: >>> This patch adds the old value param and the onchangeonly option >>> to the VM_EVENT_REASON_MOV_TO_MSR event. >>> >>> The param was added to the vm_event_mov_to_msr

Re: [Xen-devel] [RFC v3 2/4] xen/linux_compat: Add a Linux compat header

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 04:59, wrote: > For porting files from Linux it is useful to have a Linux API to Xen API > mapping header at a common location. Looking at what you add here I really think "no, please don't". But let's see what other maintainers thinks. Jan

Re: [Xen-devel] [PATCH 4/5] x86: use switch() in _put_page_type()

2017-12-05 Thread Jan Beulich
>>> On 04.12.17 at 16:40, <andrew.coop...@citrix.com> wrote: > On 04/12/17 10:46, Jan Beulich wrote: >> Use this to cheaply add another assertion. >> >> Signed-off-by: Jan Beulich <jbeul...@suse.com> >> --- >> TBD: Would it perhaps be better

Re: [Xen-devel] [PATCH v9 00/16] Enable Memory Bandwidth Allocation in Xen

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 03:53, wrote: > This patch set has got all Acked-by/Reviewed-by months ago. So, I am > wondering when it can be integrated? Any plan? Thanks! It is not being forgotten. But the tree is not fully open yet, so it is subject to the judgment of committers

Re: [Xen-devel] [RFC v3 1/4] Port WARN_ON_ONCE() from Linux

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 04:59, wrote: > Port WARN_ON_ONCE macro from Linux. A return value is expected from this > macro, so the implementation does not follow the Xen convention of wrapping > macros in a do..while. There's no such convention for macros producing a value. >

Re: [Xen-devel] [xen-unstable test] 116832: regressions - FAIL

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 11:03, <andrew.coop...@citrix.com> wrote: > On 05/12/2017 09:30, Jan Beulich wrote: >>>>> On 05.12.17 at 09:49, <osstest-ad...@xenproject.org> wrote: >>> flight 116832 xen-unstable real [real] >>> http://logs.test-lab

Re: [Xen-devel] [xen-unstable test] 116832: regressions - FAIL

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 09:49, wrote: > flight 116832 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/116832/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: >

Re: [Xen-devel] [PATCH v2] x86/hvm: fix interaction between internal and external emulation

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 15:00, <paul.durr...@citrix.com> wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 05 December 2017 13:53 >> >>> On 28.11.17 at 15:05, <paul.durr...@citrix.com> wrote: >> rc = x86_emulate(

Re: [Xen-devel] [PATCH v2] x86/hvm: fix interaction between internal and external emulation

2017-12-05 Thread Jan Beulich
>>> On 05.12.17 at 15:11, <paul.durr...@citrix.com> wrote: >> From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf >> Of Paul Durrant >> Sent: 05 December 2017 14:00 >> To: 'Jan Beulich' <jbeul...@suse.com> >> > From

Re: [Xen-devel] [PATCH 5/6] x86/mm: clean up SHARED_M2P{, _ENTRY} uses

2017-12-13 Thread Jan Beulich
>>> On 12.12.17 at 18:50, <george.dun...@citrix.com> wrote: > On 12/12/2017 03:08 PM, Jan Beulich wrote: >> Stop open-coding SHARED_M2P() and drop a pointless use of it from >> paging_mfn_is_dirty() (!VALID_M2P() is a superset of SHARED_M2P()) and >> anot

Re: [Xen-devel] [PATCH 4/6] x86/shadow: widen reference count

2017-12-13 Thread Jan Beulich
>>> On 12.12.17 at 17:32, wrote: >> @@ -82,7 +153,7 @@ struct page_info >> unsigned long type:5; /* What kind of shadow is this? */ >> unsigned long pinned:1; /* Is the shadow pinned? */ >> unsigned long head:1; /* Is this the

Re: [Xen-devel] [PATCH v9] x86/altp2m: support for setting restrictions for an array of pages

2017-12-13 Thread Jan Beulich
>>> On 13.12.17 at 08:12, wrote: > @@ -4619,6 +4623,38 @@ static int do_altp2m_op( > a.u.set_mem_access.view); > break; > > +case HVMOP_altp2m_set_mem_access_multi: > +if ( a.u.set_mem_access_multi.pad || > +

Re: [Xen-devel] [PATCH V3 2/2] Xen/PCIback: Implement PCI flr/slot/bus reset with 'reset' SysFS attribute

2017-12-17 Thread Jan Beulich
>>> On 15.12.17 at 20:52, wrote: +static int pcistub_device_reset(struct pci_dev *dev) +{ + struct xen_pcibk_dev_data *dev_data; + bool slot = false, bus = false; + struct pcistub_args arg = {}; + + if (!dev) + return

[Xen-devel] [PATCH] x86/shadow: make 1-bit-disable match 1-bit-enable

2017-12-18 Thread Jan Beulich
shadow_one_bit_enable() sets PG_SH_enable (if not already set of course) in addition to the bit being requested. Make shadow_one_bit_disable() behave similarly - clear PG_SH_enable if that's the only bit remaining. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/arch/x86/mm/

[Xen-devel] [PATCH 1/2] x86: improve NOP use for AMD CPUs

2017-12-18 Thread Jan Beulich
For Fam10 and later AMD recommends using the "long" NOP forms. Re-write the present Intel code into switch() statements and add AMD logic. This at the same time brings us in line again with current Linux. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/arch/x86/alterna

[Xen-devel] [PATCH 2/2] x86: introduce NOP9 forms

2017-12-18 Thread Jan Beulich
Both Intel and AMD recommend an operand-size-override-prefixed long NOP form for covering 9 bytes, so introduce this and use it in p6_nops[] to allow further reducing the number of NOPs needed when covering larger ranges. Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/ar

Re: [Xen-devel] [PATCH v9.1 06/16] x86: implement get hw info flow for MBA

2017-12-18 Thread Jan Beulich
>>> On 18.12.17 at 09:30, <yi.y@linux.intel.com> wrote: > This patch implements get HW info flow for MBA including its callback > function and sysctl interface. > > Signed-off-by: Yi Sun <yi.y@linux.intel.com> > Reviewed-by: Roger Pau Monné <roger.

[Xen-devel] [PATCH 0/2] x86: NOP improvements

2017-12-18 Thread Jan Beulich
1: improve NOP use for AMD CPUs 2: introduce NOP9 forms Signed-off-by: Jan Beulich <jbeul...@suse.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Xen release cycle revisited

2017-12-14 Thread Jan Beulich
>>> On 14.12.17 at 12:38, wrote: > Next try: > > 2. Should we have released 4.10 without those late security patches, >resulting in the need for 4.10.1 at once? We don't make point releases just for security issues on other branches - why would we do so right after a .0

Re: [Xen-devel] [PATCH v2 1/2] x86/vmx: Don't use hvm_inject_hw_exception() in long_mode_do_msr_write()

2017-12-14 Thread Jan Beulich
> > Using hvm_inject_hw_exception() and returning X86EMUL_EXCEPTION causes a > double #GP injection, which combines to #DF. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > Acked-by: Kevin Tian <kevin.t...@intel.com> Reviewed-by: Jan Beulich <jbeul...@sus

Re: [Xen-devel] [PATCH 1/2] x86: consider effective protection attributes in W+X check

2017-12-14 Thread Jan Beulich
>>> On 14.12.17 at 15:04, <jgr...@suse.com> wrote: > On 12/12/17 11:31, Jan Beulich wrote: >> @@ -335,42 +346,45 @@ static inline bool kasan_page_table(stru >> >> #if PTRS_PER_PMD > 1 >> >> -static void walk_pmd_level(struct seq_file *m, s

Re: [Xen-devel] Xen release cycle revisited

2017-12-14 Thread Jan Beulich
>>> On 14.12.17 at 08:56, wrote: > 4. Should we try harder to negotiate embargo dates of security issues to >match the (targeted) release dates? Personally I don't think embargo dates should be made match release dates; if anything, the other way around. Holding back

Re: [Xen-devel] [PATCH v9] x86/altp2m: support for setting restrictions for an array of pages

2017-12-13 Thread Jan Beulich
>>> On 13.12.17 at 12:02, wrote: > If we accept this case as valid, although highly unlikely, (opaque == > nr and not 0), calling p2m_set_mem_access_multi will do nothing except > locking/unlocking p2m (case in which the performance penalty will be > significantly

Re: [Xen-devel] [PATCH v14 07/11] x86/mm: add an extra command to HYPERVISOR_mmu_update...

2017-12-13 Thread Jan Beulich
>>> On 13.12.17 at 13:06, <paul.durr...@citrix.com> wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 12 December 2017 14:39 >> >>> On 12.12.17 at 14:52, <andrew.coop...@citrix.com> wrote: >> > We are deliberately trying t

  1   2   3   4   5   6   7   8   9   10   >