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

2017-11-27 Thread Andrew Cooper
. This avoids duplicating or opencoding the feature check and value logic, as well as abstracting away the internal value representation. One small adjustment to guest_wrmsr() is required to cope with being called in toolstack context. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

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

2017-11-27 Thread Andrew Cooper
ce to also cover > VMX real mode emulation. > > Reported-by: Andrew Cooper <andrew.coop...@citrix.com> > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> Tested-by: Andrew Cooper <andrew.coop...@citrix.com> __

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

2017-11-27 Thread Andrew Cooper
On 27/11/17 09:12, Jan Beulich wrote: > 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> Ac

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

2017-11-27 Thread Andrew Cooper
suitably crafted input arguments. This isn't a security > 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

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

2017-11-27 Thread Andrew Cooper
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 crash silently at boot. > > Signed-off-by: Daniel Kiper

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

2017-11-27 Thread Andrew Cooper
On 27/11/17 17:01, Jan Beulich wrote: 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

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

2017-11-28 Thread Andrew Cooper
) if the built-in > policy allows it. > > Signed-off-by: Tamas K Lengyel <lengy...@ainfosec.com> > --- > Cc: Andrew Cooper <andrew.coop...@citrix.com> > Cc: George Dunlap <george.dun...@eu.citrix.com> > Cc: Ian Jackson <ian.jack...@eu.citrix.com> > Cc: Ja

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

2017-11-23 Thread Andrew Cooper
On 23/11/17 12:45, Olaf Hering wrote: > On Thu, Nov 23, Andrew Cooper wrote: > >> Its not that.  This failure comes from the ring living inside the p2m, >> and has already been found with introspection. > In my case it was just a wrong domid. Now I use 'xl domid domU'

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

2017-11-29 Thread Andrew Cooper
: ... Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> --- xen/arch/x86/traps.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 86506f3..c9a849c 100644 --- a/xen/arch/x86/t

[Xen-devel] [PATCH for-next] x86/setup: Move reading of cached state earlier

2017-11-29 Thread Andrew Cooper
These are reads of registers which have already been set up, so are safe to do at any point. However, TLB flushes (e.g. from bootstrap_map()) don't function until get_cpu_info()->cr4 is populated. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul

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

2017-11-29 Thread Andrew Cooper
On 29/11/17 14:34, Jann Horn wrote: > On Wed, Nov 29, 2017 at 3:32 PM, Andrew Cooper > <andrew.coop...@citrix.com> wrote: >> On 29/11/17 14:23, Jann Horn wrote: >>> gnttab_setup_table() has the following code: >>> >>>

Re: [Xen-devel] [RFC PATCH] KVM: x86: Allow Qemu/KVM to use PVH entry point

2017-11-29 Thread Andrew Cooper
On 29/11/17 14:47, Juergen Gross wrote: > On 29/11/17 15:44, Paolo Bonzini wrote: >> On 29/11/2017 15:25, Boris Ostrovsky wrote: >> zeropage is x86/Linux-specific so we'd need some sort of firmware (like >> grub) between a hypervisor and Linux to convert hvm_start_info to >>

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

2017-11-29 Thread Andrew Cooper
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, unsigned int count) > { > struct gnttab_setup_table op; > struct

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

2017-11-30 Thread Andrew Cooper
rnal value representation. One small adjustment to >> guest_wrmsr() is required 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 > justificat

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

2017-12-05 Thread Andrew Cooper
On 05/12/2017 10:03, Andrew Cooper 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.xenproject.org/osstest/logs/116832/ &

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

2017-12-05 Thread Andrew Cooper
On 05/12/2017 09:30, Jan Beulich wrote: 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

[Xen-devel] [PATCH] x86/efer: Make {read, write}_efer() into inline helpers

2017-12-13 Thread Andrew Cooper
There is no need for the overhead of a call to a separate translation unit. While moving the implementation, update them to use uint64_t over u64 Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> --- xen/arch/x86/traps.c | 13 +-

[Xen-devel] [PATCH v2 2/2] x86/vmx: Drop enum handler_return

2017-12-13 Thread Andrew Cooper
They are straight aliases of the more common X86EMUL_* constants. While adjusting these, fix the case indentation where appropriate. No functional change, confirmed by diff'ing the compiled binary. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Acked-by: Kevin Tian &l

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

2017-12-13 Thread Andrew Cooper
h combines to #DF. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Acked-by: Kevin Tian <kevin.t...@intel.com> --- CC: Jan Beulich <jbeul...@suse.com> v2: * Drop uncanonical_address and return HNDL_exception_raised directly This wants backporting to 4.9 --- xen

Re: [Xen-devel] [PATCH] docs/process/xen-release-management: Lesson to learn

2017-12-13 Thread Andrew Cooper
On 13/12/17 12:02, Ian Jackson wrote: > The 4.10 release preparation was significantly more hairy than ideal. > (We seem to have a good overall outcome despite, rather than because > of, our approach.) > > This is the second time (at least) that we have come close to failure > by committing to a

[Xen-devel] [PATCH] x86/microcode: Add support for fam17h microcode loading

2017-12-13 Thread Andrew Cooper
.@amd.com> Signed-off-by: Thomas Gleixner <t...@linutronix.de> Reviewed-by: Borislav Petkov <b...@alien8.de> Signed-off-by: Ingo Molnar <mi...@kernel.org> [Linux commit f4e9b7af0cd58dd039a0fb2cd67d57cea4889abf] Ported to Xen. Signed-off-by: Andrew Cooper <andrew.coop...@citri

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

2017-12-18 Thread Andrew Cooper
verriding to the K8 flavor on those few (older) CPUs. > > This at the same time brings us in line again in this regard with > current Linux. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> __

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

2017-12-18 Thread Andrew Cooper
On 18/12/17 10:13, Jan Beulich wrote: > 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

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

2017-12-18 Thread Andrew Cooper
ff-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 2/2] x86/dom0: remove is_pv_domain leftovers from the PV domain builder

2017-12-19 Thread Andrew Cooper
On 19/12/17 14:20, Roger Pau Monne wrote: > Those where added when PVHv1 was sharing the domain builder with PV. > > Signed-off-by: Roger Pau Monné <roger@citrix.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ X

Re: [Xen-devel] [PATCH 1/2] x86/dom0: remove autotranslate leftovers

2017-12-19 Thread Andrew Cooper
On 19/12/17 14:20, Roger Pau Monne wrote: > Signed-off-by: Roger Pau Monné <roger@citrix.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproj

[Xen-devel] [PATCH] xen/efi: Fix build with clang-5.0

2017-12-13 Thread Andrew Cooper
The clang-5.0 build is reliably failing with: Error: size of boot.o:.text is 0x01 which is because efi_arch_flush_dcache_area() exists as a single ret instruction. Mark it as __init like everything else in the files. Spotted by Travis. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.

Re: [Xen-devel] [PATCH v2] simplify xenmem_add_to_physmap_batch()

2017-12-20 Thread Andrew Cooper
its resulting use also rename the function's "start" > parameter to "extent". > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH] x86/nops: Switch to the P6 nops as a compile-time default

2017-12-20 Thread Andrew Cooper
Along with c/s d7128e735031 switching the runtime choice of best nops, switch the compile-time default to P6 nops. This is more efficient on most processors for alternative points which add/remove code, rather than switch between two different pieces of code. Signed-off-by: Andrew Cooper

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

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:15, Jan Beulich wrote: On 03.07.17 at 16:56, wrote: > On 31.05.17 at 13:54, wrote: >> 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 >

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Andrew Cooper
On 01/12/17 22:58, Stefano Stabellini wrote: > > = Xen command forwarding = > > In the code below, it looks like Xen is forwarding everything to OP-TEE. > Are there some commands Xen should avoid forwarding? Should we have a > whitelist or a blacklist? Whitelist everything. At the very minimum,

Re: [Xen-devel] [PATCH 3/3] x86/p2m: force return value checking of p2m_set_entry()

2017-12-04 Thread Andrew Cooper
On 04/12/17 11:07, Jan Beulich wrote: > As XSAs 246 and 247 have shown, not doing so is rather dangerous. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel m

Re: [Xen-devel] [PATCH 2/3] x86/MSI: leverage local variables

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:33, Jan Beulich wrote: > ... instead of using redundant calculations. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> Now that pci_sbdf_t has been introduced, I should dust off my p

Re: [Xen-devel] [PATCH 3/5] x86: improve _put_page_type() readability

2017-12-04 Thread Andrew Cooper
ptible, ptpg); > -ptpg = NULL; > if ( x & PGT_partial ) > put_page(page); > -break; Newline here.  Otherwise, Reviewed-by: Andrew Cooper <andrew.coop...@citix.com> > +return rc; >

Re: [Xen-devel] [PATCH 1/3] x86/IRQ: conditionally preserve access permission on map error paths

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:32, Jan Beulich wrote: > Permissions that had been granted before should not be revoked when > handling unrelated errors. > > Reported-by: HW42 > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/irq.c > +++ b/xen/arch/x86/irq.c > @@ -1918,6

Re: [Xen-devel] [PATCH 1/5] x86: make get_page_from_mfn() return struct page_info *

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:44, Jan Beulich wrote: > Almost all users of it want it, and it calculates it anyway. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel m

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

2017-12-04 Thread Andrew Cooper
suitable return value, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v3 01/25] x86emul: make decode_register() return unsigned long *

2017-12-07 Thread Andrew Cooper
On 07/12/17 13:58, Jan Beulich wrote: > Quite a few casts can be dropped this way, and type-safeness is being > increased by not using void * (same goes for decode_vex_gpr()). Drop > casts and no longer needed intermediate variables where possible. Take > the opportunity and also switch the last

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

2017-12-11 Thread Andrew Cooper
On 11/12/17 09:14, Jan Beulich wrote: On 08.12.17 at 13:42, wrote: >> On 12/08/2017 02:18 PM, Jan Beulich wrote: >> On 24.10.17 at 12:19, wrote: HVMOP_altp2m_set_mem_access_multi has been added as a HVMOP (as opposed to a

Re: [Xen-devel] [PATCH] domctl: improve locking during domain destruction

2017-12-06 Thread Andrew Cooper
;jbeul...@suse.com> This is clearer.  Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> > --- > Changes since RFC: Comment added. > --- > Obviously other domctl-s could benefit from similar adjustments, so > this is meant to be just a start. > > --- a/xen/common/domain.c

[Xen-devel] [PATCH] x86/intel: Drop zeroed-out select_idle_routine() function

2017-12-06 Thread Andrew Cooper
Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> --- xen/arch/x86/cpu/intel.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index ac932e5..d3145c0 100644 --- a/xen/arch/x86

Re: [Xen-devel] [PATCH 2/2] x86: rename DIRTY_GS_BASE_USER

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:38, Jan Beulich wrote: > As of commit 91f85280b9 ("x86: fix GS-base-dirty determination") the > USER part of it isn't really appropriate anymore. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Coope

Re: [Xen-devel] [PATCH 1/2] x86: improve MSR_SHADOW_GS accesses

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:37, Jan Beulich wrote: > --- a/xen/include/asm-x86/msr.h > +++ b/xen/include/asm-x86/msr.h > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -172,6 +173,24 @@ static inline unsigned long rdgsbase(voi > return base; > } >

Re: [Xen-devel] [PATCH] simplify xenmem_add_to_physmap_batch()

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:21, Jan Beulich wrote: > There's no need for > - advancing the handles and at the same time using > __copy_{from,to}_guest_offset(), > - an "out" label, > - local variables "done" and (function scope) "rc". > > Signed-off-by: Jan Beulich These changes do mean

Re: [Xen-devel] [PATCH] VMX: drop bogus gpa parameter from __invept()

2017-12-06 Thread Andrew Cooper
Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86/HVM: make explicit that hvm_print_line() does output only

2017-12-06 Thread Andrew Cooper
ore any input requests and accept only printable characters, > + * newline, and horizontal tab. > + */ > +if ( dir != IOREQ_WRITE || > + (!isprint(c) && (c != '\n') && (c != '\t')) ) > return X86EMUL_OKAY; Given that there is no funct

Re: [Xen-devel] [PATCH] mm: don't use domain_shutdown() when re-offlining a page

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:20, Jan Beulich wrote: > It goes all silent, leaving open what has actually caused the crash. > Use domain_crash() instead, which leaves a log message before calling > domain_shutdown(..., SHUTDOWN_crash). > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Ac

Re: [Xen-devel] [PATCH] pdx: correct indentation

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:19, Jan Beulich wrote: > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailm

Re: [Xen-devel] [PATCH] xenmem_add_to_physmap_one() has no need to know of XENMAPSPACE_gmfn_range

2017-12-06 Thread Andrew Cooper
n going through "idx" when capturing the MFN. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> This looks to be based on some of your other mm cleanup, which isn't yet in staging. ___

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

2017-12-06 Thread Andrew Cooper
ion, which combines to #DF. While fixing this up, rename uncanonical_address to the more common gp_fault, and drop the HVM_DBG_LOG() line which is redundant given the two adjacent lines. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: J

[Xen-devel] [PATCH 2/2] x86/vmx: Drop enum handler_return

2017-12-06 Thread Andrew Cooper
They are straight aliases of the more common X86EMUL_* constants. While adjusting these, fix the case indentation where appropriate. No functional change, confirmed by diff'ing the compiled binary. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...

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

2017-12-05 Thread Andrew Cooper
On 05/12/17 11:16, Jan Beulich wrote: On 05.12.17 at 11:03, wrote: >> On 05/12/2017 09:30, Jan Beulich wrote: >> On 05.12.17 at 09:49, wrote: flight 116832 xen-unstable real [real]

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

2017-12-12 Thread Andrew Cooper
On 12/12/17 13:25, Jan Beulich wrote: On 28.11.17 at 16:08, wrote: >> @@ -1905,7 +1906,8 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, >> l1_pgentry_t nl1e, >> } >> >> /* Translate foreign guest address. */ >> -if (

Re: [Xen-devel] [PATCH 1/2] x86/E820: don't overrun array

2017-12-12 Thread Andrew Cooper
On 12/12/17 11:10, Jan Beulich wrote: > The bounds check needs to be done after the increment, not before, or > else it needs to use a one lower immediate. Also use word operations > rather than byte ones for both the increment and the compare (allowing > E820_BIOS_MAX to be more easily bumped,

Re: [Xen-devel] [PATCH 2/2] x86/E820: improve insn selection

2017-12-12 Thread Andrew Cooper
d-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>, altbeit it preferably with space in the first hunk. Any chance we can drop redundant size suffixes as we go? > > --- a/xen/arch/x86/boot/mem.S > +++ b/xen/arch/x86/boo

Re: [Xen-devel] [xen-unstable test] 116832: regressions - FAIL [and 1 more messages]

2017-12-05 Thread Andrew Cooper
On 05/12/17 15:31, Jan Beulich wrote: On 05.12.17 at 16:05, wrote: >> Jan Beulich writes ("Re: [Xen-devel] [xen-unstable test] 116832: regressions >> - >> FAIL"): >>> This is a blue screen, recurring, and has first been reported in flight >>> 116779, i.e. was

Re: [Xen-devel] [PATCH 4/3] x86: don't ignore foreigndom on L2/L3/L4 page table updates

2017-12-04 Thread Andrew Cooper
individual case blocks. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Ping#3: [PATCH v3] x86/HVM: don't #GP/#SS on wrapping virt->linear translations

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:16, Jan Beulich wrote: On 25.08.17 at 16:59, wrote: > On 10.08.17 at 09:19, wrote: >> On 10.07.17 at 12:39, wrote: Real hardware wraps silently in most cases, so we should behave the same. Also split real and VM86 mode

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Andrew Cooper
ter all, >> was not buggy - it merely uncovered the other issue, as far as we >> can tell. > > I understand. I have seen you pushed the fixes in master today. Let > see how it perform and decide tomorrow what to do. XenServer testing has identified this bug, and shown the bug to be

Re: [Xen-devel] [PATCH for-4.11] x86/pv: Unconditionally hide EFER.SVME from PV guests

2018-05-04 Thread Andrew Cooper
On 04/05/18 19:45, Boris Ostrovsky wrote: > On 05/04/2018 01:28 PM, Andrew Cooper wrote: >> --- a/xen/include/asm-x86/msr-index.h >> +++ b/xen/include/asm-x86/msr-index.h >> @@ -31,6 +31,9 @@ >> #define EFER_LMSLE (1<<_EFER_LMSLE) >> #def

[Xen-devel] [PATCH for-4.11] x86/pv: Unconditionally hide EFER.SVME from PV guests

2018-05-04 Thread Andrew Cooper
. Take the opportunity to reuse the mask to simplify svm_vmcb_isvalid(), and change "undefined" to "unknown" in the print message, as there is at least EFER.TCE (Translation Cache Extension) defined but unknown to Xen. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Re: [Xen-devel] [PATCH v3 0/2] SVM: guest state handling adjustments

2018-05-04 Thread Andrew Cooper
e to > fold > both patches into one (or swap their order). > > 1: re-work VMCB sync-ing > 2: introduce a VM entry helper > > Signed-off-by: Jan Beulich <jbeul...@suse.com> As this is fixing a real bug and we're getting quite late in 4.11 at this point, Acked-by: Andrew

Re: [Xen-devel] [PATCH for-4.11] x86/pv: Unconditionally hide EFER.SVME from PV guests

2018-05-07 Thread Andrew Cooper
On 07/05/2018 08:03, Jan Beulich wrote: On 04.05.18 at 19:28, wrote: >> --- a/xen/arch/x86/pv/emul-priv-op.c >> +++ b/xen/arch/x86/pv/emul-priv-op.c >> @@ -867,7 +867,9 @@ static int read_msr(unsigned int reg, uint64_t *val, >> return X86EMUL_OKAY; >> >>

Re: [Xen-devel] [PATCH v2 1/5] doc: add architecture qualifier to boot parameter entries

2018-05-07 Thread Andrew Cooper
On 07/05/18 11:16, Juergen Gross wrote: > Many of the architecture specific boot parameters are not qualified > as such. Correct that. You also rearrange PKU to be in order. > Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Andrew Cooper <andrew.

Re: [Xen-devel] [PATCH v2 for-4.11] x86/pv: Hide more EFER bits from PV guests

2018-05-07 Thread Andrew Cooper
On 07/05/18 11:43, Jan Beulich wrote: On 07.05.18 at 12:00, wrote: >> --- a/xen/arch/x86/pv/emul-priv-op.c >> +++ b/xen/arch/x86/pv/emul-priv-op.c >> @@ -867,9 +867,16 @@ static int read_msr(unsigned int reg, uint64_t *val, >> return X86EMUL_OKAY; >> >>

Re: [Xen-devel] [PATCH for-4.11] x86/pv: Unconditionally hide EFER.SVME from PV guests

2018-05-07 Thread Andrew Cooper
On 07/05/2018 09:00, Jan Beulich wrote: On 07.05.18 at 09:30, wrote: >> On 07/05/2018 08:03, Jan Beulich wrote: >> On 04.05.18 at 19:28, wrote: --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-op.c

Re: [Xen-devel] [PATCH v2 3/5] doc: correct livepatch.markdown syntax

2018-05-07 Thread Andrew Cooper
On 07/05/18 11:16, Juergen Gross wrote: > "make -C docs all" fails due to incorrect markdown syntax in > livepatch.markdown. Correct it. Which version of markdown, ooi?  Version 1.0.1 seems fine with this. ___ Xen-devel mailing list

Re: [Xen-devel] domain_crash_sync vs "plain crash"

2018-05-07 Thread Andrew Cooper
On 07/05/2018 08:09, Jan Beulich wrote: On 07.05.18 at 03:06, wrote: >> When I'm performing some hypercalls with some "unexpected" parameters >> (robustness test) sometimes the guest is explicitly "killed" by xen >> calling the domain_crash(), but sometimes the guest

Re: [Xen-devel] [PATCH v2 2/5] doc: add credit2_cap_period_ms boot parameter description

2018-05-07 Thread Andrew Cooper
On 07/05/18 11:16, Juergen Gross wrote: > credit2_cap_period_ms isn't mentioned in xen-command-line.markdown. > Add a description. > > Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> _

Re: [Xen-devel] [PATCH v2 3/5] doc: correct livepatch.markdown syntax

2018-05-07 Thread Andrew Cooper
On 07/05/18 11:30, Juergen Gross wrote: > On 07/05/18 12:23, Andrew Cooper wrote: >> On 07/05/18 11:16, Juergen Gross wrote: >>> "make -C docs all" fails due to incorrect markdown syntax in >>> livepatch.markdown. Correct it. >> Which version

Re: [Xen-devel] [PATCH v3 2/2] SVM: introduce a VM entry helper

2018-05-07 Thread Andrew Cooper
On 07/05/18 15:11, Jan Beulich wrote: On 04.05.18 at 17:11, wrote: >> --- a/xen/arch/x86/hvm/svm/entry.S >> +++ b/xen/arch/x86/hvm/svm/entry.S >> @@ -61,23 +61,8 @@ UNLIKELY_START(ne, nsvm_hap) >> jmp .Lsvm_do_resume >> __UNLIKELY_END(nsvm_hap) >> >> -

Re: [Xen-devel] [PATCH v3 2/2] SVM: introduce a VM entry helper

2018-05-07 Thread Andrew Cooper
On 07/05/18 16:46, Boris Ostrovsky wrote: > On 05/07/2018 11:29 AM, Andrew Cooper wrote: >> On 07/05/18 16:25, Jan Beulich wrote: >>>>>> On 07.05.18 at 16:19, <andrew.coop...@citrix.com> wrote: >>>> On 07/05/18 15:11, Jan Beulich wrote: >>>

Re: [Xen-devel] [PATCH v3 2/2] SVM: introduce a VM entry helper

2018-05-07 Thread Andrew Cooper
On 07/05/18 16:25, Jan Beulich wrote: On 07.05.18 at 16:19, wrote: >> On 07/05/18 15:11, Jan Beulich wrote: >> On 04.05.18 at 17:11, wrote: --- a/xen/arch/x86/hvm/svm/entry.S +++ b/xen/arch/x86/hvm/svm/entry.S @@ -61,23 +61,8

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

2018-05-14 Thread Andrew Cooper
On 14/05/18 18:08, Ian Jackson wrote: > diff --git a/tools/libs/call/libxencall.map b/tools/libs/call/libxencall.map > index 2f96144..299ca38 100644 > --- a/tools/libs/call/libxencall.map > +++ b/tools/libs/call/libxencall.map > @@ -2,6 +2,7 @@ VERS_1.0 { > global: >

Re: [Xen-devel] [PATCH] x86/shutdown: use ACPI reboot method for Dell PowerEdge R540

2018-05-14 Thread Andrew Cooper
On 14/05/18 17:22, Ross Lagerwall wrote: > On 05/14/2018 04:17 PM, Jan Beulich wrote: > On 14.05.18 at 13:02, wrote: >>> When EFI booting the Dell PowerEdge R540 it consistently wanders into >>> the weeds and gets an invalid opcode in the EFI ResetSystem call. This

Re: [Xen-devel] [RFC PATCH] x86/pagewalk: Honor SMAP_CHECK_DISABLED

2018-05-07 Thread Andrew Cooper
On 07/05/2018 20:57, Jason Andryuk wrote: > commit 4c5d78a10dc89427140a50a1df5a0b8e9f073e82 (x86/pagewalk: > Re-implement the pagetable walker) removed honoring the > smap_check_policy of the running VCPU. guest_walk_tables is used by > copy_{to,from}_guest for HVMs, so it is called when the

Re: [Xen-devel] [PATCH v2 1/3] xen/pvh: enable and set default MTRR type

2018-05-09 Thread Andrew Cooper
On 09/05/18 11:21, Roger Pau Monne wrote: > On PVH MTRR is not initialized by the firmware (because there's no > firmware), so the kernel is started with MTRR disabled which means all > memory accesses are UC. > > So far there have been no issues (ie: slowdowns) caused by this > because PVH only

Re: [Xen-devel] [PATCH] pci: treat class 0 devices as endpoints

2018-05-08 Thread Andrew Cooper
[size=4K] > Capabilities: [80] Power Management version 3 > > Arguably this is not a legacy device (since this is a new server), but > in any case Xen needs to deal with it. > > Suggested-by: Andrew Cooper <andrew.coop...@citrix.com> > Signed-off-by: Roger Pau Monné &l

[Xen-devel] [PATCH v3.5 1/2] doc: correct livepatch.markdown syntax

2018-05-08 Thread Andrew Cooper
ads rather more consistently in HTML and PDF form. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- docs/misc/livepatch.markdown | 693 --- 1 file changed, 320 insertions(+), 373 deletions(-) diff --git a/docs/misc/livepatch.markdown b/

[Xen-devel] [PATCH for-4.8] x86/emul: Fix emulator test harness build following a91b2ec337a

2018-05-09 Thread Andrew Cooper
Versions of Xen before c/s 5c6c3ac in Xen 4.9 don't use msr-index.h for the test harness. Reported-by: Ian Jackson <ian.jack...@eu.citrix.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/tests/x86_emulator

Re: [Xen-devel] [PATCH for-4.11] libacpi: fixes for iasl >= 20180427

2018-05-09 Thread Andrew Cooper
gt; > --- > Cc: Jan Beulich <jbeul...@suse.com> > Cc: Ian Jackson <ian.jack...@eu.citrix.com> > Cc: Wei Liu <wei.l...@citrix.com> > Cc: Juergen Gross <jgr...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86/cpuidle: don't init stats lock more than once

2018-04-27 Thread Andrew Cooper
> cpuidle_init_cpu(1) ran on CPU 0 while some other CPU held the lock (the > unlock then put the lock in the state that CPU1 is observing). > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Andrew Cooper <andrew.coop...@citrix.com> __

Re: [Xen-devel] [PATCH] x86emul: VMOVNTDQA should raise #GP(0) on mis-alignment

2018-04-27 Thread Andrew Cooper
On 27/04/18 13:10, Jan Beulich wrote: > Commit 50b73118d5 introduced emulation of the insn without extending the > set of opcodes requiring special alignment related #GP behavior. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Andrew Cooper <andr

[Xen-devel] [PATCH for-4.11] x86/traps: Improve code generation for set_ist()

2018-04-27 Thread Andrew Cooper
/shrink: 0/7 up/down: 0/-334 (-334) While making changes here, tidy up the set_ist() declaration. Drop the always_inline (I don't recall why I wrote it like that originally) and the ist parameter need not be unsigned long (although it will be const-propagated in practice). Signed-off-by: Andrew Cooper

Re: [Xen-devel] reboot driver domain, vifX.Y = NO-CARRIER?

2018-04-27 Thread Andrew Cooper
On 27/04/18 16:03, Jason Cooper wrote: > All, > > On Gentoo Xen 4.9.1, I've been creating minimal Linux DomU's to create a > virtual, segregated network infrastructure. This has been going really > well, and I'm slowly progressing toward a self-updating system. > > My main snag has to do with

Re: [Xen-devel] reboot driver domain, vifX.Y = NO-CARRIER?

2018-04-27 Thread Andrew Cooper
On 27/04/18 17:14, Jason Cooper wrote: > On Fri, Apr 27, 2018 at 04:52:57PM +0100, Andrew Cooper wrote: >> On 27/04/18 16:35, Jason Cooper wrote: >>> On Fri, Apr 27, 2018 at 04:11:39PM +0100, Andrew Cooper wrote: >>>> On 27/04/18 16:03, Jason Cooper wrote: >>

Re: [Xen-devel] [PATCH RESEND v1 0/7] Intel Processor Trace virtulization enabling

2018-05-10 Thread Andrew Cooper
On 10/05/18 10:26, Kang, Luwei wrote: > Here is a patch-series which adding Processor Trace enabling in XEN > guest. You can get It's software developer manuals from: > https://software.intel.com/sites/default/files/managed/c5/15/archite > ct

Re: [Xen-devel] [SVM] Adding page access bits

2018-05-10 Thread Andrew Cooper
On 10/05/18 13:59, Alexandru Stefan ISAILA wrote: > Hello, > > We want to add the page access functionality to the SVM code. We have > been trying to add 4 bits in the pte but all seem to be taken. > > Is there a way to accommodate them in the 24 bit flag mask? > > I think it can be done by moving

[Xen-devel] [PATCH 01/10] x86/spec_ctrl: Read MSR_ARCH_CAPABILITIES only once

2018-05-11 Thread Andrew Cooper
Make it available from the beginning of init_speculation_mitigations(), and pass it into appropriate functions. Fix an RSBA typo while moving the affected comment. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.

[Xen-devel] [PATCH 09/10] x86/spec_ctrl: Introduce a new `spec-ctrl=` command line argument to replace `bti=`

2018-05-11 Thread Andrew Cooper
BTI-Thunk RETPOLINE, SPEC_CTRL: IBRS-, Other: IBPB (XEN) Support for VMs: PV: None, HVM: MSR_SPEC_CTRL RSB (XEN) XPTI (64-bit PV only): Dom0 enabled, DomU enabled Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu &l

[Xen-devel] [PATCH 06/10] x86/spec_ctrl: Split X86_FEATURE_SC_MSR into PV and HVM variants

2018-05-11 Thread Andrew Cooper
In order to separately control whether MSR_SPEC_CTRL is virtualised for PV and HVM guests, split the feature used to control runtime alternatives into two. Xen will use MSR_SPEC_CTRL itself if either of these features are active. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

[Xen-devel] [PATCH 08/10] x86/cpuid: Improvements to guest policies for speculative sidechannel features

2018-05-11 Thread Andrew Cooper
mitigations. Break the logic common to both PV and HVM CPUID calculations into a common helper, to avoid duplication. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> CC: Roger Pau Monné <roger@ci

[Xen-devel] [PATCH 07/10] x86/spec_ctrl: Explicitly set Xen's default MSR_SPEC_CTRL value

2018-05-11 Thread Andrew Cooper
MSR_SPEC_CTRL default until after dom0 has been constructed when safe to do so. Oracle report that this speeds up boots of some hardware by 50s. Reported-by: Zhenzhong Duan <zhenzhong.d...@oracle.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@su

[Xen-devel] [PATCH for-4.11 00/10] x86: Improvements and fixes to Spectre handling

2018-05-11 Thread Andrew Cooper
be considered at this point, as all of the Spectre code is new in 4.11. Andrew Cooper (10): x86/spec_ctrl: Read MSR_ARCH_CAPABILITIES only once x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable x86/spec_ctrl: Merge bti_ist_info and use_shadow_spec_ctrl into spec_ctrl_flags x86

[Xen-devel] [PATCH 04/10] x86/spec_ctrl: Fold the XEN_IBRS_{SET, CLEAR} ALTERNATIVES together

2018-05-11 Thread Andrew Cooper
-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> CC: Roger Pau Monné <roger@citrix.com> CC: Juergen Gross <jgr...@suse.com> --- xen/arch/x86/spec_ctrl.c| 12 +- xen/includ

[Xen-devel] [PATCH 05/10] x86/spec_ctrl: Rename bits of infrastructure to avoid NATIVE and VMEXIT

2018-05-11 Thread Andrew Cooper
. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> CC: Roger Pau Monné <roger@citrix.com> CC: Juergen Gross <jgr...@suse.com> --- xen/arch/x86/hvm/svm/entry.S| 4 ++-- xen/arch/x

[Xen-devel] [PATCH 02/10] x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable

2018-05-11 Thread Andrew Cooper
into a separate variable (in the top of stack block for XPTI reasons) and use this instead of bti_ist_info in the IST path. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> CC: Roger Pau Monné <

[Xen-devel] [PATCH 10/10] x86/spec_ctrl: Elide MSR_SPEC_CTRL handling in idle context when possible

2018-05-11 Thread Andrew Cooper
If Xen is virtualising MSR_SPEC_CTRL handling for guests, but using 0 as its own MSR_SPEC_CTRL value, spec_ctrl_{enter,exit}_idle() need not write to the MSR. Requested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Be

[Xen-devel] [PATCH 03/10] x86/spec_ctrl: Merge bti_ist_info and use_shadow_spec_ctrl into spec_ctrl_flags

2018-05-11 Thread Andrew Cooper
All 3 bits of information here are control flags for the entry/exit code behaviour. Treat them as such, rather than having two different variables. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com

Re: [Xen-devel] [PATCH v3 1/2] doc: correct livepatch.markdown syntax

2018-05-11 Thread Andrew Cooper
On 11/05/18 18:56, Konrad Rzeszutek Wilk wrote: > On Tue, May 08, 2018 at 11:51:47AM +0100, George Dunlap wrote: >> On 05/08/2018 07:47 AM, Juergen Gross wrote: >>> "make -C docs all" fails due to incorrect markdown syntax in >>> livepatch.markdown. Correct it. >>> >>> Signed-off-by: Juergen Gross

  1   2   3   4   5   6   7   8   9   10   >