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

2017-11-22 Thread Andrew Cooper
mx_vcpu_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 <igor.druzhi...@citrix.com> > Signed-off-by: Jan Beulich <jbeul...@suse.com

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 <george.dun...@citrix.com> > --- > CC: Ian Jackson <ian.jack...@citrix.com> > CC: Wei Liu <wei.l...@citrix.com> > CC: Andrew Cooper <andrew.coop...@citrix.com> > CC: Jan Beulich &l

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

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

2017-11-21 Thread Andrew Cooper
anything I'd expect we need >>>> "#elif defined(__clang__)" to achieve the same for Clang by >>>> some different pragma (if such exists). >>> Not having received any reply so far, I'm wondering whether >>&g

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

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,

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

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 =

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 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 <andrew.coop...@citrix.com> > Reviewed-by: Jan Beulich <jb

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

2017-11-20 Thread Andrew Cooper
Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Jun Nakajima <jun.nakaj...@intel.com> CC: Kevin Tian <kevin.t...@intel.com> --- xen/arch/x86/hvm/vmx/intr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) d

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" > >

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

[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
ure on 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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC:

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

2017-11-16 Thread Andrew Cooper
ike 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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Ian Ja

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> CC: Jun Nakajima <jun.nakaj...@intel.com> CC: Kevin Tian <kevin.t...@int

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 > --- >

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
ctionality). > Thanks, much better. > >> Signed-off-by: Adrian Pop <a...@bitdefender.com> >> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com> FOAD, Requesting a release ack for this change. ~And

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

2017-11-14 Thread Andrew Cooper
..@bitdefender.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> CC'ing Julien.  This is 4.10 material IMO; it would be a security issue if rcu_lock_current_domain() wasn't a nop in Xen.  Debug builds are also liable to hit an assertion pertaining to the preempt_count() (which again,

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

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Wei Liu <wei.l...@citrix.

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

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

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

2017-10-31 Thread Andrew Cooper
_vmcb(struct vcpu *v) > > /* PAT is under 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

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

2017-10-31 Thread Andrew Cooper
() first. Call ASSERT_NOT_IN_ATOMIC() after each operation in the multicall, to make failures more obvious. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: George Dunlap <george.dun...@eu.citrix.com> CC: Jan Beulich <jbeul...@suse.com> CC: Konrad Rzeszu

[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 <andrew.coop...@citrix.com> --- CC: George Dunlap <george.dun...@eu.citrix.com>

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

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
y: Haozhong Zhang <haozhong.zh...@intel.com> >> --- >> Cc: Jan Beulich <jbeul...@suse.com> >> Cc: Andrew Cooper <andrew.coop...@citrix.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> Given that this is a trivial cleanup patch, I will include

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 >>

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

2017-10-26 Thread Andrew Cooper
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 Reviewed-by: Andrew Cooper <andrew.coop...@

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've never

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; >> } >> >> +/*

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 >>>

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 <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> Hopefully this won't have cau

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

2017-10-26 Thread Andrew Cooper
) 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 <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> Julien: This should be a 4.10 candidate, as it cause

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, <andrew.coop...@citrix.com> wrote: >> On 25/10/17 11:59, George Dunlap wrote: >>>>>>>>> +Limit, x86 HVM: 128 >>>>>>>>> + Limit, ARM32: 8 >&

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

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

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 prolog

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 curre

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

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: >

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

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]

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
he stack is generally considered bad practice. In this case, >>>> 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 &

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
uest, >> the completion notification 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 <andrew.coop...@citrix.com> > Please could y

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

2017-10-20 Thread Andrew Cooper
a moderate chance that the conditional 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 <andr

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 <jbeul...@suse.com> Printing this information is definitely a good idea. Reviewed-by Andrew Cooper <andrew.coop..

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 Beulich <jbeul...@suse.com> Reviewed-b

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> CC: Jun Nakajima <jun.nakaj...@intel.com> CC: Kevin Ti

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 <xumengpa...@gmail.com> wrote: >> On Thu, Oct 19, 2017 at 11:40 AM, Andrew Cooper >> <andrew.coop...@citrix.com> wrote: >>> On 19/10/17 16:09, Kyle Huey wrote: >>>>

[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
to that instead. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Kevin Tian <kevin.t...@intel.com> CC: Julien Grall <julien.gr...@arm.com> Julien: This wants backporting to all releases, and therefore should be considered for

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> --- xen/arch/x86/domain.c

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> --- xen/arch/x86/pv/descri

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Wei Liu <wei.l...@citrix.com> --- xen/arch/x86/pv/d

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

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 +++

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 place

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

2017-10-19 Thread Andrew Cooper
to that instead. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Kevin Tian <kevin.t...@intel.com> CC: Julien Grall <julien.gr...@arm.com> Julien: This wants backporting to all releases, and therefore should be considered for 4.10

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 <jbeul...@suse.com> Acked-by: Andrew Cooper <a

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

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

2017-10-17 Thread Andrew Cooper
gt; CC: Stefano Stabellini <sstabell...@kernel.org> >> Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> > Acked-by: Wei Liu <wei.l...@citrix.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> CC'ing Julien for a release ack, as this is a blocker (du

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: We

[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 <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: We

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

2017-10-17 Thread Andrew Cooper
be 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 <andrew.coop...@citrix.com> --- CC: George Dunlap <george.dun...@eu.citrix.com> CC: Jan Beulich <jb

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é <roger@citrix.com> >>>

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)[]

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 @@

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

2017-10-17 Thread Andrew Cooper
m> Possibly worth 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 <andrew.coop...@citrix.com>, and I agree that this shoul

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

2017-10-16 Thread Andrew Cooper
tween starting and the first call >> to HYPERCALL_set_gdt() were lar/lsl/verr/verw suffer non-architectural >> behaviour. >> >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com> > >> This probably w

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

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

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

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 >> for

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, <andrew.coop...@citrix.com> 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 _V

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, >> >>

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

2017-10-16 Thread Andrew Cooper
estroy_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 <andrew.coop...@citrix.com> --- CC: Ja

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

2017-10-16 Thread Andrew Cooper
ich 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-off-by: Andrew

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 >> for >

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 t

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

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

[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

[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
, and 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 <andrew.coop...@citrix.com> --- CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Wei Liu <wei.l...@cit

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

2017-10-13 Thread Andrew Cooper
;> Reviewed-by: Doug Goldstein <car...@cardoe.com> >>>> Signed-off-by: David Esler <drumandst...@gmail.com> >>> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> >>> >>> This should also be included in 4.10 IMO. >> I'm not convinc

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   >