Re: [Xen-devel] [PATCH v2] sync CPU state upon final domain destruction

2017-11-22 Thread Andrew Cooper
_destroy()) and the > intention to limit the performance impact (otherwise it could also go > into rcu_do_batch(), paralleling the use in do_tasklet_work()). > > Reported-by: Igor Druzhinin > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper > --- > v2: Move from vmx_vcpu_

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

2017-11-21 Thread Andrew Cooper
On 13/11/17 15:41, George Dunlap wrote: > Signed-off-by: George Dunlap > --- > CC: Ian Jackson > CC: Wei Liu > CC: Andrew Cooper > CC: Jan Beulich > CC: Stefano Stabellini > CC: Konrad Wilk > CC: Tim Deegan > CC: Tamas K Len

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

2017-11-21 Thread Andrew Cooper
On 21/11/17 19:05, Ian Jackson wrote: > George Dunlap writes ("Re: [PATCH 10/16] SUPPORT.md: Add Debugging, analysis, > crash post-portem"): >> gdbsx security support: Someone may want to debug an untrusted guest, >> so I think we should say 'yes' here. > I think running gdb on an potentially host

Re: [Xen-devel] Ping#2: [PATCH] x86emul: keep compiler from using {x, y, z}mm registers itself

2017-11-21 Thread Andrew Cooper
to achieve the same for Clang by >>>> some different pragma (if such exists). >>> Not having received any reply so far, I'm wondering whether >>> being able to build the test harness with clang is more >>> important than for it to work correctly when built with gcc. I >>> can't predict when I would get around to set up a suitable >>> clang on my dev systems. >> I agree with the argument you make above. On the unlikely chance >> there's a problem Travis should catch it, and someone who actually has a >> clang setup can help sort it out. > I'm still lacking an ack, before it being sensible to check with Julien > whether this is still fine to go in at this late stage. Acked-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH for-4.10] libxc: load acpi RSDP table at correct address

2017-11-21 Thread Andrew Cooper
On 21/11/17 09:37, Juergen Gross wrote: > On 21/11/17 09:46, Jan Beulich wrote: > On 21.11.17 at 09:13, wrote: >>> On 21/11/17 08:50, Jan Beulich wrote: >>> On 20.11.17 at 19:28, wrote: > On 20/11/17 17:14, Jan Beulich wrote: > On 20.11.17 at 16:24, wrote: >>> So without

Re: [Xen-devel] [PATCH for-4.10] libxc: load acpi RSDP table at correct address

2017-11-21 Thread Andrew Cooper
On 21/11/17 07:44, Jan Beulich wrote: On 20.11.17 at 17:59, wrote: >> On 11/20/2017 11:43 AM, Jan Beulich wrote: >> On 20.11.17 at 17:28, wrote: On 11/20/2017 11:26 AM, Jan Beulich wrote: On 20.11.17 at 17:14, wrote: >> What could cause grub2 to fail to find space for

Re: [Xen-devel] [PATCH for-4.10] libxc: load acpi RSDP table at correct address

2017-11-20 Thread Andrew Cooper
On 20/11/17 14:25, Boris Ostrovsky wrote: > On 11/20/2017 09:14 AM, Juergen Gross wrote: >> On 20/11/17 14:56, Boris Ostrovsky wrote: >>> On 11/20/2017 06:50 AM, Jan Beulich wrote: >>> On 20.11.17 at 12:20, wrote: > Which restriction? I'm loading the RSDP table to its architectural > c

Re: [Xen-devel] [PATCH for-4.10] x86/hvm: Don't ignore unknown MSRs in the migration stream

2017-11-20 Thread Andrew Cooper
On 17/11/17 12:10, Jan Beulich wrote: On 16.11.17 at 20:15, wrote: >> Doing so amounts to silent state corruption, and must be avoided. > I think a little more explanation is needed on why the current code > is insufficient. Note specifically this > > for ( i = 0; !err && i < ctxt->count;

Re: [Xen-devel] [PATCH for-4.10] x86/hvm: Don't corrupt the HVM context stream when writing the MSR record

2017-11-20 Thread Andrew Cooper
; (XEN) HVM4.0 restore: not enough data left to read 56 MSR bytes >> (XEN) HVM4 restore: failed to load entry 20/0 >> >> Signed-off-by: Andrew Cooper > Reviewed-by: Jan Beulich > >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/

[Xen-devel] [PATCH for-next] x86/vmx: Drop more PVHv1 remenants

2017-11-20 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx/intr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c index 4c0f1c8..eb9b288 100644 --- a/xen/arch/x86

Re: [Xen-devel] [PATCH for-4.10] libxc: load acpi RSDP table at correct address

2017-11-20 Thread Andrew Cooper
On 20/11/17 10:43, Juergen Gross wrote: > On 20/11/17 11:21, Andrew Cooper wrote: >> On 20/11/17 10:04, Juergen Gross wrote: >>> On 20/11/17 10:58, Andrew Cooper wrote: >>>> On 20/11/2017 09:55, Juergen Gross wrote: >>>>> On 20/11/17 10:51, Roger Pau

Re: [Xen-devel] [PATCH for-4.10] libxc: load acpi RSDP table at correct address

2017-11-20 Thread Andrew Cooper
On 20/11/17 10:04, Juergen Gross wrote: > On 20/11/17 10:58, Andrew Cooper wrote: >> On 20/11/2017 09:55, Juergen Gross wrote: >>> On 20/11/17 10:51, Roger Pau Monné wrote: >>>> Adding xen-devel, dropped it on my reply.  >>>> >>>>

Re: [Xen-devel] [PATCH for-4.10] libxc: load acpi RSDP table at correct address

2017-11-20 Thread Andrew Cooper
On 20/11/2017 09:55, Juergen Gross wrote: > On 20/11/17 10:51, Roger Pau Monné wrote: >> Adding xen-devel, dropped it on my reply.  >> >> Replying from my phone, sorry for the formatting.  >> >> >> El 20 nov. 2017 9:35, "Juergen Gross" > > escribió: >> >>

Re: [Xen-devel] [xen-4.6-testing test] 116222: regressions - FAIL

2017-11-17 Thread Andrew Cooper
On 17/11/17 17:21, Ian Jackson wrote: > osstest service owner writes ("[xen-4.6-testing test] 116222: regressions - > FAIL"): >> flight 116222 xen-4.6-testing real [real] >> http://logs.test-lab.xenproject.org/osstest/logs/116222/ >> >> Regressions :-( >> >> Tests which did not succeed and are blo

[Xen-devel] [PATCH for-4.10] x86/hvm: Don't corrupt the HVM context stream when writing the MSR record

2017-11-16 Thread Andrew Cooper
the destination side looks like: (XEN) HVM4 restore: CPU_MSR 0 (XEN) HVM4.0 restore: not enough data left to read 56 MSR bytes (XEN) HVM4 restore: failed to load entry 20/0 Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Julien Grall This wants backporting to

[Xen-devel] [PATCH for-4.10] tools/libxc: Fix restoration of PV MSRs after migrate

2017-11-16 Thread Andrew Cooper
sed like this for PV guests are the AMD DBGEXT MSRs, which only exist in fairly modern hardware, and whose use doesn't appear to be implemented in any contemporary PV guests. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Ian Jackson CC: Wei Liu CC: Julien Grall This wants backp

[Xen-devel] [PATCH for-4.10] x86/hvm: Don't ignore unknown MSRs in the migration stream

2017-11-16 Thread Andrew Cooper
Doing so amounts to silent state corruption, and must be avoided. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Jun Nakajima CC: Kevin Tian CC: Boris Ostrovsky CC: Suravee Suthikulpanit CC: Julien Grall This wants backporting to all stable trees, so should also be

Re: [Xen-devel] [PATCH 2/2] x86/svm: Add virtual GIF support

2017-11-16 Thread Andrew Cooper
On 16/11/17 15:32, Brian Woods wrote: > This patch detects and enables Virtual GIF if available. This allows > a nested hypervisor to perform STGIs and CLGIs without having to be > intercepted by host hypervisor. > > Signed-off-by: Brian Woods > --- > xen/arch/x86/hvm/svm/nestedsvm.c | 7 ++-

Re: [Xen-devel] [PATCH for-4.10 2/2] xen/arm: p2m: Add more debug in get_page_from_gva

2017-11-15 Thread Andrew Cooper
On 15/11/17 19:34, Julien Grall wrote: > The function get_page_from_gva is used by copy_*_guest helpers to > translate a guest virtual address to a machine physical address and take > reference on the page. > > There are a couple of errors path that will return the same value making > difficult to

Re: [Xen-devel] [PATCH for-4.10 v2] x86/hvm: Fix altp2m_vcpu_enable_notify error handling

2017-11-15 Thread Andrew Cooper
Thanks, much better. > >> Signed-off-by: Adrian Pop >> Reviewed-by: Andrew Cooper > Reviewed-by: Jan Beulich FOAD, Requesting a release ack for this change. ~Andrew ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] x86/hvm: Fix rcu_unlock_domain call bypass

2017-11-14 Thread Andrew Cooper
On 14/11/17 15:11, Adrian Pop wrote: > rcu_lock_current_domain is called at the beginning of do_altp2m_op, but > the altp2m_vcpu_enable_notify subop handler might skip calling > rcu_unlock_domain, possibly hanging the domain altogether. > > Signed-off-by: Adrian Pop Reviewed-by

Re: [Xen-devel] [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Andrew Cooper
On 09/11/17 15:47, Jan Beulich wrote: On 09.11.17 at 16:37, wrote: >> These tables are pointed to from FADT. Adding them will >> result in duplicate entries in the guest's tables. >> >> Signed-off-by: Boris Ostrovsky > Reviewed-by: Jan Beulich > > Pulled into x86-next, thanks. ~Andrew __

[Xen-devel] [PATCH for-4.10] x86/cpuid: Minor fixups missed from previous work

2017-11-03 Thread Andrew Cooper
* Add more feature names to ./xen-cpuid * Vertically align the magic comments in cpufeatureset.h Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Ian Jackson CC: Wei Liu CC: Julien Grall This is a nice-to-have for Xen 4.10. It is very low risk, as the functional changes are

Re: [Xen-devel] [PATCH 0/9] x86/vvmx: Read instruction operands correctly on VM exit

2017-11-02 Thread Andrew Cooper
On 02/11/17 07:23, Tian, Kevin wrote: >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: Friday, October 27, 2017 1:59 AM >> >> On 26/10/17 18:03, Euan Harris wrote: >>> decode_vmx_inst() does not read instruction operands correctly on VM &g

Re: [Xen-devel] [PATCH v1] x86/vvmx: don't enable vmcs shadowing for nested guests

2017-11-02 Thread Andrew Cooper
On 02/11/17 04:35, Tian, Kevin wrote: >> From: Sergey Dyasli [mailto:sergey.dya...@citrix.com] >> Sent: Monday, October 23, 2017 5:33 PM >> >> Running "./xtf_runner vvmx" in L1 Xen under L0 Xen produces the >> following result on H/W with VMCS shadowing: >> >> Test: vmxon >> Failure in test

Re: [Xen-devel] [PATCH 0/3] x86/svm: virtual VMLOAD/VMSAVE

2017-11-01 Thread Andrew Cooper
On 01/11/17 17:00, Boris Ostrovsky wrote: > On 10/31/2017 06:03 PM, brian.wo...@amd.com wrote: >> From: Brian Woods >> >> x86/svm: virtual VMLOAD/VMSAVE >> >> On AMD family 17h server processors, there is a feature called virtual >> VMLOAD/VMSAVE. This allows a nested hypervisor to preform a VMLO

Re: [Xen-devel] [PATCH 3/3] x86/svm: add virtual VMLOAD/VMSAVE support

2017-10-31 Thread Andrew Cooper
nder complete control of SVM when using nested paging. */ > svm_disable_intercept_for_msr(v, MSR_IA32_CR_PAT); > + > +/* use virtual VMLOAD/VMSAVE if available */ > +if (cpu_has_svm_vloadsave) { The style in this file is quite hit and miss, but we expect n

[Xen-devel] [PATCH for-4.10] common/multicall: Increase debugability for bad hypercalls

2017-10-31 Thread Andrew Cooper
_lock() first. Call ASSERT_NOT_IN_ATOMIC() after each operation in the multicall, to make failures more obvious. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deegan CC: Wei Liu CC: Julien Grall As with the re

[Xen-devel] [PATCH for-4.10] common/spinlock: Improve the output from check_lock() if it trips

2017-10-31 Thread Andrew Cooper
If check_lock() triggers, a crash will occur. Instead of simply identifying "the irq context was different", indicate the expected and current irq context. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim

Re: [Xen-devel] Is there something in Xen to clear IA32_DEBUGCTL MSR during hvm execution

2017-10-28 Thread Andrew Cooper
On 28/10/2017 13:40, 刘维杰 wrote: > Dear list, > > We are some researchers who are interested in Xen so much. And > recently we meet a problem when we want to fetch some Intel Last > Branch Record information of guest HVMs. > > When we are trying to debug the Intel IA32_DEBUGCTL MSR on Xen 4.6.0 Unr

Re: [Xen-devel] Xen 4.10.0 RC1 test result

2017-10-27 Thread Andrew Cooper
On 27/10/17 09:28, Hao, Xudong wrote: > > We performed Xen 4.10 RC1 testing on Intel Xeon Skylake, Broadwell > server, Intel Atom Denverton platforms, verified many functional > features, which include new features Local MCE, L2 CAT and UMIP on Xen > 4.10. We’d like to share the result out. > >   >

Re: [Xen-devel] [RFC XEN PATCH v3 02/39] x86_64/mm: drop redundant MFN to page conventions in cleanup_frame_table()

2017-10-27 Thread Andrew Cooper
Signed-off-by: Haozhong Zhang >> --- >> Cc: Jan Beulich >> Cc: Andrew Cooper Reviewed-by: Andrew Cooper Given that this is a trivial cleanup patch, I will include it in the x86-next branch I am maintaining until the 4.11 release window opens. ~Andrew

Re: [Xen-devel] ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79!

2017-10-26 Thread Andrew Cooper
On 26/10/17 20:29, Sander Eikelenboom wrote: > On 26/10/17 19:49, Craig Bergstrom wrote: >> Sander, thanks for the details, they've been very useful. >> >> I suspect that your host system's mem=2048M parameter is causing the >> problem. Any chance you can confirm by removing the parameter and >> r

Re: [Xen-devel] [PATCH 0/9] x86/vvmx: Read instruction operands correctly on VM exit

2017-10-26 Thread Andrew Cooper
ad() with operand_read() > x86/vvmx: Remove operand reading from decode_vmx_inst() > x86/vvmx: Use correct sizes when reading operands > x86/hvm: Add hvm_copy_{to,from}_guest_virt() helpers > x86/vvmx: Use hvm_copy_{to,from}_guest_virt() to read operands All

Re: [Xen-devel] [PATCH v1] tools/hotplug: convert proc-xen.mount to proc-xen.service

2017-10-26 Thread Andrew Cooper
On 26/10/17 16:59, Olaf Hering wrote: > On Thu, Oct 26, Andrew Cooper wrote: > >> Can't all information be obtained from /sys/hypervisor?  If not, how >> hard would it be to make happen? > Likely not that hard. Not sure why that was not added in the first place. I'

Re: [Xen-devel] [PATCH v1] tools/hotplug: convert proc-xen.mount to proc-xen.service

2017-10-26 Thread Andrew Cooper
On 26/10/17 16:25, Olaf Hering wrote: > An upcoming change in systemd will mount xenfs right away, along with > all other system mounts. This improves the detection of the > virtualization environment, which is currently racy. Some parts of > systemd rely on the presence of /proc/xen/capabilities,

Re: [Xen-devel] [PATCH for-next] x86/pv: Factor out the calculation of LDT/GDT descriptor pointers

2017-10-26 Thread Andrew Cooper
On 26/10/17 16:06, Jan Beulich wrote: On 17.10.17 at 17:05, wrote: >> @@ -16,4 +17,14 @@ static inline int pv_emul_is_mem_write(const struct >> x86_emulate_state *state, >>: X86EMUL_UNHANDLEABLE; >> } >> >> +/* Return a pointer to the GDT/LD

Re: [Xen-devel] [PATCH 0/6] Intel Processor Trace virtulization enabling

2017-10-26 Thread Andrew Cooper
On 26/10/17 05:13, Kang, Luwei wrote: >>> Hi All, >>> >>> 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/architect >>> ure-instruction-set-extensions-p

Re: [Xen-devel] [PATCH 2/5 v2] libxl: Change the type of console_mfn to xen_pfn_t

2017-10-26 Thread Andrew Cooper
On 26/10/17 12:13, Wei Liu wrote: > On Wed, Oct 25, 2017 at 02:57:05PM +0530, Bhupinder Thakur wrote: >> Currently the type of console mfn is unsigned long in libxl. This may be >> an issue for 32-bit toolstack running on 64-bit Xen, where the pfn are >> 64 bit. To ensure that console_mfn can hold

Re: [Xen-devel] [PATCH 2/2] x86: fix asm() constraint for GS selector update

2017-10-26 Thread Andrew Cooper
On 26/10/17 08:57, Jan Beulich wrote: > Exception fixup code may alter the operand, which ought to be reflected > in the constraint. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Hopefully this won't have caused us any real pro

Re: [Xen-devel] [PATCH 1/2] x86: don't latch wrong (stale) GS base addresses

2017-10-26 Thread Andrew Cooper
_kern_l1e() nor guest_io_okay() need more than the page > tables being the kernel ones for the memory access they want to do. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Julien: This should be a 4.10 candidate, as it causes

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-10-26 Thread Andrew Cooper
On 26/10/17 10:19, Jan Beulich wrote: >>>> On 25.10.17 at 13:30, wrote: >> On 25/10/17 11:59, George Dunlap wrote: >>>>>>>>> +Limit, x86 HVM: 128 >>>>>>>>> +Limit, ARM32: 8 >>>>>>>>> +Li

Re: [Xen-devel] [PATCH for-next 6/9] kconfig: add llvm coverage option

2017-10-26 Thread Andrew Cooper
On 26/10/17 10:19, Roger Pau Monne wrote: > diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile > index 0e0510679e..e4541a1233 100644 > --- a/xen/common/coverage/Makefile > +++ b/xen/common/coverage/Makefile > @@ -1,3 +1,4 @@ > +ifeq ($(CONFIG_GCOV),y) > obj-y += gcov_base.o g

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

2017-10-26 Thread Andrew Cooper
On 26/10/17 10:19, Roger Pau Monne wrote: > @@ -209,6 +210,12 @@ static int gcov_dump_all(XEN_GUEST_HANDLE_PARAM(char) > buffer, > return ret; > } > > +static struct cov_sysctl_ops cov_ops = { static const. ~Andrew ___ Xen-devel mailing list X

Re: [Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-25 Thread Andrew Cooper
n't enjoy writing that email, but it has unblocking things in a more productive direction. > > > Andrew Cooper writes ("Re: [PATCH for-4.10 1/2] tools/libxc: Fix > precopy_policy() to not pass a structure by value"): >> someone who does understand why hiding a prologu

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-10-25 Thread Andrew Cooper
On 25/10/17 11:59, George Dunlap wrote: >>>>>>> +Limit, x86 HVM: 128 >>>>>>> +Limit, ARM32: 8 >>>>>>> +Limit, ARM64: 128 >>>>>>> + >>>>>>> +[XXX Andrew Cooper: Do want to add &quo

Re: [Xen-devel] [PATCH] x86/vpmu: Remove unnecessary call to do_interrupt()

2017-10-25 Thread Andrew Cooper
> +if ( !(vpmu_mode & XENPMU_MODE_ALL) && > !vpmu->arch_vpmu_ops->do_interrupt(regs) ) > return; > > As result of this extra call VPMU no longer works for PV guests on Intel > because we effectively lose value of MSR_CORE_PERF_GLOBAL_STATUS. > >

Re: [Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-25 Thread Andrew Cooper
On 19/10/17 16:17, Ian Jackson wrote: > Andrew Cooper writes ("Re: [PATCH for-4.10 1/2] tools/libxc: Fix > precopy_policy() to not pass a structure by value"): >> On 16/10/17 16:07, Ian Jackson wrote: >>> This statement is true only if you think "the prec

Re: [Xen-devel] [PATCH] x86/boot: fix MB2 header to require EFI BS

2017-10-24 Thread Andrew Cooper
On 24/10/2017 22:11, Daniel Kiper wrote: > On Tue, Oct 24, 2017 at 09:22:20PM +0100, Andrew Cooper wrote: >> On 24/10/17 21:08, Daniel Kiper wrote: >>> On Tue, Oct 24, 2017 at 02:40:41PM -0500, Doug Goldstein wrote: >>>> The EFI multiboot2 entry point currentl

Re: [Xen-devel] [PATCH] x86/boot: fix MB2 header to require EFI BS

2017-10-24 Thread Andrew Cooper
On 24/10/17 21:08, Daniel Kiper wrote: > On Tue, Oct 24, 2017 at 02:40:41PM -0500, Doug Goldstein wrote: >> The EFI multiboot2 entry point currently requires EFI BootServices to >> not have been exited however the header currently tells the boot >> loader that Xen optionally supports EFI BootServic

Re: [Xen-devel] [PATCH 0/6] Intel Processor Trace virtulization enabling

2017-10-24 Thread Andrew Cooper
On 21/10/17 21:02, Luwei Kang wrote: > Hi All, > > 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/architecture-instruction-set-extensions-programming-refer

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-10-24 Thread Andrew Cooper
On 24/10/17 11:27, George Dunlap wrote: > On 10/23/2017 06:55 PM, Andrew Cooper wrote: >> On 23/10/17 17:22, George Dunlap wrote: >>> On 09/11/2017 06:53 PM, Andrew Cooper wrote: >>>> On 11/09/17 18:01, George Dunlap wrote: >>>>> +### x86/RAM >>

Re: [Xen-devel] [PATCH v2] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-10-24 Thread Andrew Cooper
On 23/10/17 11:20, Juergen Gross wrote: > On 06/10/17 15:30, Julien Grall wrote: >> Hi, >> >> On 27/09/17 15:36, Wei Liu wrote: >>> On Tue, Sep 26, 2017 at 02:02:56PM +0200, Juergen Gross wrote: Long ago domains to be saved were limited to 1TB size due to the migration stream v1 limitatio

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-10-23 Thread Andrew Cooper
On 23/10/17 17:22, George Dunlap wrote: > On 09/11/2017 06:53 PM, Andrew Cooper wrote: >> On 11/09/17 18:01, George Dunlap wrote: >>> +### x86/RAM >>> + >>> +Limit, x86: 16TiB >>> +Limit, ARM32: 16GiB >>> +Limit, ARM64: 5TiB >>

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

2017-10-23 Thread Andrew Cooper
On 23/10/17 15:34, Jan Beulich wrote: On 23.10.17 at 15:58, wrote: >> On 23/10/17 09:40, Jan Beulich wrote: >> On 23.10.17 at 01:49, wrote: flight 115037 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/115037/ Regressions :-( Tests

Re: [Xen-devel] [PATCH for-4.10 v2] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-23 Thread Andrew Cooper
t; if >> a >>>> timeout occurs because of a sluggish device which is processing the >>>> request, >>>> the completion notification will corrupt the stack of a subsequent deeper >> call >>>> tree. >>>> >>>> Place t

Re: [Xen-devel] [PATCH for-4.10 v2] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-20 Thread Andrew Cooper
fication will corrupt the stack of a subsequent deeper >> call >> tree. >> >> Place the poll_slot in a percpu area and DMA to that instead. >> >> Signed-off-by: Andrew Cooper > Please could you extend the commit message to state the issue > remaining with

Re: [Xen-devel] [PATCH 3/3] x86: avoid FS/GS base reads when possible

2017-10-20 Thread Andrew Cooper
nditional is more overhead than the rd{fs,gs}base instruction alone. ISTR Andy Lutomirsky finding that they were actually very efficient instructions. I'm not sure which is the better option here, but I'm not aversed to the change, so Acked-by: Andrew Cooper > > --- a/xen/arch/

Re: [Xen-devel] [PATCH 2/3] x86: also show FS/GS base addresses when dumping registers

2017-10-20 Thread Andrew Cooper
it seems easier (and less overall > overhead) to do so compared to the alternative of introducing another > helper structure. > > Signed-off-by: Jan Beulich Printing this information is definitely a good idea. Reviewed-by Andrew Cooper , with two observations. > > --- a/xen/ar

Re: [Xen-devel] [PATCH 1/3] x86: fix GS-base-dirty determination

2017-10-20 Thread Andrew Cooper
a stale kernel address in GS_BASE when the incoming > guest is in user mode, the check on the outgoing vCPU needs to be > dependent upon the mode it is currently in, rather than blindly looking > at the user base. > > Signed-off-by: Jan

[Xen-devel] [PATCH for-next] x86/VT-x: Don't use rdmsr() to fill HOST_SYSENTER_{CS, EIP}

2017-10-20 Thread Andrew Cooper
These are compile-time constants, and don't need to be read back from hardware. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx/vmcs.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xen

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Andrew Cooper
On 19/10/17 19:24, Kyle Huey wrote: > On Thu, Oct 19, 2017 at 11:20 AM, Meng Xu wrote: >> On Thu, Oct 19, 2017 at 11:40 AM, Andrew Cooper >> wrote: >>> On 19/10/17 16:09, Kyle Huey wrote: >>>> On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky >>>>

[Xen-devel] [PATCH for-4.10 v2] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
instead. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Kevin Tian CC: Julien Grall Julien: This wants backporting to all releases, and therefore should be considered for 4.10 at this point. v2: * Retain volatile declaration for poll_slot. * Initialise poll_slot to QINVAL_STAT_INIT on

[Xen-devel] [PATCH for-next 2/3] x86/pv: Use DIV_ROUND_UP() when converting between GDT entries and frames

2017-10-19 Thread Andrew Cooper
Also consistently use use nr_frames, rather than mixing nr_pages with a frames[] array. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/domain.c | 8 +--- xen/arch/x86/pv/descriptor-tables.c | 17 - 2

[Xen-devel] [PATCH for-next 1/3] x86/pv: Move compat_set_gdt() to be beside do_set_gdt()

2017-10-19 Thread Andrew Cooper
This also makes the do_update_descriptor() pair of functions adjacent. Purely code motion; no functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/pv/descriptor-tables.c | 69 +++-- 1 file changed, 36 insertions

[Xen-devel] [PATCH for-next 3/3] x86/pv: Misc improvements to pv_destroy_gdt()

2017-10-19 Thread Andrew Cooper
Hoist the l1e_from_pfn(zero_pfn, __PAGE_HYPERVISOR_RO) calculation out of the loop, and switch the code over to using mfn_t. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/pv/descriptor-tables.c | 17 ++--- 1 file changed, 10 insertions(+), 7

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Andrew Cooper
On 19/10/17 16:09, Kyle Huey wrote: > On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky > wrote: >> On 10/10/2017 12:54 PM, Kyle Huey wrote: >>> On Mon, Jul 24, 2017 at 9:54 AM, Kyle Huey wrote: On Mon, Jul 24, 2017 at 8:07 AM, Boris Ostrovsky wrote: >>> One thing I noticed is that

Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
On 19/10/17 14:25, Jan Beulich wrote: On 19.10.17 at 14:54, wrote: >> On 19/10/17 13:11, Jan Beulich wrote: >> On 19.10.17 at 13:26, wrote: --- a/xen/drivers/passthrough/vtd/qinval.c +++ b/xen/drivers/passthrough/vtd/qinval.c @@ -147,7 +147,8 @@ static int __must_check que

Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
On 19/10/17 13:11, Jan Beulich wrote: On 19.10.17 at 13:26, wrote: >> --- a/xen/drivers/passthrough/vtd/qinval.c >> +++ b/xen/drivers/passthrough/vtd/qinval.c >> @@ -147,7 +147,8 @@ static int __must_check queue_invalidate_wait(struct >> iommu *iommu, >>

Re: [Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-19 Thread Andrew Cooper
On 16/10/17 16:07, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() > to not pass a structure by value"): >> On Mon, Oct 16, 2017 at 02:51:54PM +0100, Andrew Cooper wrote: > ... >>> With Joshua's patch in pla

[Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
instead. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Kevin Tian CC: Julien Grall Julien: This wants backporting to all releases, and therefore should be considered for 4.10 at this point. --- xen/drivers/passthrough/vtd/qinval.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

Re: [Xen-devel] [PATCH] gcov: support gcc 7.x

2017-10-18 Thread Andrew Cooper
On 18/10/17 14:45, Jan Beulich wrote: > Taking Linux commit 0538421343 ("gcov: support GCC 7.1") as reference, > enable gcc 7 support requiring __gcov_exit() and having 9 counters. > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Like the UBSAN stuff, I think

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-17 Thread Andrew Cooper
On 17/10/17 18:10, George Dunlap wrote: > Allowing pagetables to point to other pagetables of the same level > (often called 'linear pagetables') has been included in Xen since its > inception; but recently it has been the source of a number of subtle > reference-counting bugs. > > It is not used b

Re: [Xen-devel] [PATCH] tools: libxendevicemodel: Restore symbol versions for 1.0

2017-10-17 Thread Andrew Cooper
abolished >> the old one. That is quite wrong. >> >> Instead, we should have left the 1.0 map alone and added a new version >> which simply adds the new symbol. >> >> Fix this. >> >> Reported-by: Ross Lagerwall >> CC: Stefano Stabellini >

[Xen-devel] [PATCH for-next] x86/VT-x: Don't rewrite HOST_TR_SELECTOR on every context switch

2017-10-17 Thread Andrew Cooper
TSS_ENTRY is a compile time constant, so HOST_TR_SELECTOR can be set up during VMCS construction and left alone thereafter, rather than rewriting it on every context switch. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx

[Xen-devel] [PATCH for-next] x86/pv: Factor out the calculation of LDT/GDT descriptor pointers

2017-10-17 Thread Andrew Cooper
Rather than opencoding it in two places. While only used in the PV emulation code, this helper is in principle usable anywhere in the hypervisor. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/pv/emul-gate-op.c | 5 + xen/arch/x86/pv

[Xen-devel] [PATCH] xen/public: Correct the definition of GNTTAB_CACHE_SOURCE_GREF

2017-10-17 Thread Andrew Cooper
represented in type 'int' (XEN) [ Xen-4.10.0-rc x86_64 debug=y Tainted:H ] Update all of the GNTTAB_CACHE_* constants to be unsigned integers. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deega

Re: [Xen-devel] [PATCH for-4.10 2/2] ubsan: disable unaligned access checks

2017-10-17 Thread Andrew Cooper
h the unaligned check a PVH Dom0 impossible. >>> >>> The main offenders seem to be the ACPI code, the VMX code and >>> specially the intremap code (set_ire_sid). >>> >>> Signed-off-by: Roger Pau Monné >>> --- >>> Cc: Andrew Cooper >

Re: [Xen-devel] [PATCH for-4.10] string: fix memmove when size is 0

2017-10-17 Thread Andrew Cooper
On 17/10/17 13:03, Roger Pau Monne wrote: > ubsan in clang 5.0 complains with: > > (XEN) UBSAN: Undefined behaviour in string.c:50:28 > (XEN) pointer overflow: > (XEN) addition of unsigned offset to 8310 overflowed to > 830f > [...] > (XEN) Xen call trace: > (XEN)[] ubs

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-17 Thread Andrew Cooper
On 16/10/17 17:21, Jan Beulich wrote: On 16.10.17 at 18:07, wrote: >> On 16/10/17 16:41, Jan Beulich wrote: >>> >>> On 16.10.17 at 16:38, wrote: --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -614,6 +614,7 @@ static int __init pvh_setup_cpus(struct

Re: [Xen-devel] [PATCH] mm/shadow: fix declaration of fetch_type_names

2017-10-17 Thread Andrew Cooper
noting that this is exposed by Clang when building with UBSAN ? Either way, thanks for getting to the bottom of this issue.  (It's been on my TODO list to figure out for a rather long time.) Acked-by: Andrew Cooper , and I agree that this should go into 4.10. > --- > Cc: Tim Deegan > Cc

Re: [Xen-devel] [PATCH for-next] xen/pv: Construct d0v0's GDT properly

2017-10-16 Thread Andrew Cooper
st call >> to HYPERCALL_set_gdt() were lar/lsl/verr/verw suffer non-architectural >> behaviour. >> >> Signed-off-by: Andrew Cooper > Reviewed-by: Jan Beulich > >> This probably wants backporting to Xen 4.7 and later. > Could you remind me once the patch has gon

Re: [Xen-devel] [PATCH for-4.10] libxl: annotate s to be nonnull in libxl__enum_from_string

2017-10-16 Thread Andrew Cooper
On 16/10/17 15:56, Ian Jackson wrote: > Wei Liu writes ("[PATCH for-4.10] libxl: annotate s to be nonnull in > libxl__enum_from_string"): >> Hope this can placate coverity. > Acked-by: Ian Jackson > > We are very soon going to want "NN2" and maybe "NN_1_2". The hypervisor uses #define __nonnull

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

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:16, Ian Jackson wrote: > Andrew Cooper writes ("Re: [Xen-devel] [xen-4.8-testing test] 114505: > regressions - FAIL"): >> On 15/10/17 20:45, osstest service owner wrote: >>> flight 114505 xen-4.8-testing real [real] >>> http://logs.tes

Re: [Xen-devel] [PATCH] libxc: don't fail domain creation when unpacking initrd fails

2017-10-16 Thread Andrew Cooper
On 16/10/17 17:19, Jan Beulich wrote: On 16.10.17 at 17:45, wrote: >> Jan Beulich writes ("[PATCH] libxc: don't fail domain creation when >> unpacking >> initrd fails"): >>> At least Linux kernels have been able to work with gzip-ed initrd for >>> quite some time; initrd compressed with oth

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

2017-10-16 Thread Andrew Cooper
On 16/10/17 17:12, Jan Beulich wrote: On 16.10.17 at 11:14, wrote: >> On 15/10/17 20:45, osstest service owner wrote: >>> flight 114505 xen-4.8-testing real [real] >>> http://logs.test-lab.xenproject.org/osstest/logs/114505/ >>> >>> Regressions :-( >>> >>> Tests which did not succeed and are

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:51, Roger Pau Monné wrote: > On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: >> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >>all state is actually set up. As it currently stands, d0v0 is eligible >>

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:39, Jan Beulich wrote: >>>> On 16.10.17 at 16:49, wrote: >> On 16/10/17 15:44, Wei Liu wrote: >>> On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: >>>> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_f

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:41, Jan Beulich wrote: > >>> On 16.10.17 at 16:38, wrote: >> --- a/xen/arch/x86/hvm/dom0_build.c >> +++ b/xen/arch/x86/hvm/dom0_build.c >> @@ -614,6 +614,7 @@ static int __init pvh_setup_cpus(struct domain *d, >> paddr_t entry, >> >> update_domain_wallclock_time(d); >> >>

[Xen-devel] [PATCH for-next] xen/pv: Construct d0v0's GDT properly

2017-10-16 Thread Andrew Cooper
pv_destroy_gdt() which initially fills the references to zero_page. In practice, this means there is a window between starting and the first call to HYPERCALL_set_gdt() were lar/lsl/verr/verw suffer non-architectural behaviour. Signed-off-by: Andrew Cooper --- CC: Jan Beulich This probably wants bac

[Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
me which prevents d0 from being scheduled. * x86 PVH dom0's must set v->is_initialised on d0v0, to prevent another vcpu being able to call VCPUOP_initialise and modify state under the feet of the running vcpu. This is latent as PVH dom0 construction don't yet function. Signed-

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 15:44, Wei Liu wrote: > On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: >> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >>all state is actually set up. As it currently stands, d0v0 is eligible >> fo

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

2017-10-16 Thread Andrew Cooper
On 16/10/17 08:42, Sergey Dyasli wrote: > On Fri, 2017-10-13 at 16:16 +0100, Andrew Cooper wrote: >> On 13/10/17 13:35, Sergey Dyasli wrote: >>> @@ -210,6 +375,255 @@ struct msr_domain_policy >>> bool available; /* This MSR is non-architectural */ >&

Re: [Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-16 Thread Andrew Cooper
On 16/10/17 14:40, Wei Liu wrote: > On Fri, Oct 13, 2017 at 06:32:18PM +0100, Andrew Cooper wrote: >> c/s 4d69b3495 "Introduce migration precopy policy" uses bogus reasoning to >> justify passing precopy_stats by value. >> >> Under no circumstances can the pr

Re: [Xen-devel] [PATCH] x86emul: keep compiler from using {x, y, z}mm registers itself

2017-10-16 Thread Andrew Cooper
On 16/10/17 13:32, Jan Beulich wrote: > Since the emulator acts on the live hardware registers, we need to > prevent the compiler from using them e.g. for inlined memcpy() / > memset() (as gcc7 does). We can't, however, set this from the command > line, as otherwise the 64-bit build would face issu

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

2017-10-16 Thread Andrew Cooper
On 15/10/17 20:45, osstest service owner wrote: > flight 114505 xen-4.8-testing real [real] > http://logs.test-lab.xenproject.org/osstest/logs/114505/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > test-xtf-amd64-amd64-2 48 xtf/tes

[Xen-devel] [PATCH for-4.10 2/2] tools/libxc: Fix various code smells in send_memory_live()

2017-10-13 Thread Andrew Cooper
* Don't zero ctx->save.stats; it is already zeroed * No need for x as it duplicates ctx->save.stats.iteration * Defer setting dirty_count until the bitmap has been filled to match the behaviour of XEN_DOMCTL_SHADOW_OP_CLEAN * Drop spurious blank line Signed-off-by: Andrew Coo

[Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-13 Thread Andrew Cooper
d drop the typedef (because none of the other callback have this oddity). This is no functional change, as there are no users of this interface yet. Signed-off-by: Andrew Cooper --- CC: Ian Jackson CC: Wei Liu CC: Julien Grall Appologies for this being late. I did intend to get it sorted b

Re: [Xen-devel] [PATCH 2/2] x86/boot: rename send_chr to print_err

2017-10-13 Thread Andrew Cooper
ire C-string and not one character and >>>> doesn't necessarily just send it over the serial UART anymore so rename >>>> it to print_err so that its closer in name to what it does. >>>> >>>> Reviewed-by: Doug Goldstein >>>> Signed-of

Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Andrew Cooper
On 13/10/17 14:01, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH for-4.10] libxl: handle NULL in > libxl__enum_from_string"): >> I agree they shouldn't be called with NULL. We should guard against >> error (here or the libxl_*_type_from_string) or annotate the input can't >> be NULL. > I mean,

  1   2   3   4   5   6   7   8   9   10   >