[Xen-devel] [PATCH V1 0/1] Xen/Tools: PCI reset using 'reset' SysFS attribute

2017-12-07 Thread Govinda Tatti
This patch contains Xen/libxl specific changes to support PCI reset (flr/slot/bus) in Xen pciback driver based on SysFS 'reset' attribute. It depends on the following kernel patch. - Xen/PCIback: Implement PCI flr/slot/bus reset with 'reset' SysFS attribute Govinda Tatti (1): Xen/libxl:

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

2017-12-07 Thread Maran Wilson
Changes from v1: * Adopted Paolo's suggestion for defining a v2 PVH ABI that includes the e820 map instead of using the second module entry to pass the table. * Cleaned things up a bit to reduce the number of xen vs non-xen special cases. Juergen also had a suggestion to split the

[Xen-devel] [PATCH V3 0/2] Xen/PCIback: PCI reset using 'reset' SysFS attribute

2017-12-07 Thread Govinda Tatti
This patch contains Xen pciback driver changes to support PCI reset (flr/slot/bus) based on SysFS 'reset' attribute. The following Xen libxl patch depends on these kernel patches. - Xen/libxl: Perform PCI reset using 'reset' SysFS attribute Govinda Tatti (2): Drivers/PCI: Export pcie_has_flr()

[Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-07 Thread Govinda Tatti
This patch exports pcie_has_flr() and it is being used by Xen pciback driver to reset (flr/slot/bus) PCI devices based on 'reset' SysFS attribute. Signed-off-by: Govinda Tatti --- v3: -New drivers/pci/pci.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3

Re: [Xen-devel] [PATCH for-next 16/16] xen/arm: traps: Merge do_trap_instr_abort_guest and do_trap_data_abort_guest

2017-12-07 Thread Julien Grall
Hi Stefano, On 7 December 2017 at 22:43, Stefano Stabellini wrote: > On Thu, 23 Nov 2017, Julien Grall wrote: >> @@ -2039,10 +1982,11 @@ static void do_trap_data_abort_guest(struct >> cpu_user_regs *regs, >> case FSC_FLT_PERM: >> { >> const struct

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

2017-12-07 Thread Maran Wilson
For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the guest is not needed, Qemu should be able to boot directly into the uncompressed Linux kernel binary without the need to run firmware. There already exists

[Xen-devel] [RFC PATCH v2 1/2] xen/pvh: Add memory map pointer to hvm_start_info struct

2017-12-07 Thread Maran Wilson
The start info structure that is defined as part of the x86/HVM direct boot ABI and used for starting Xen PVH guests would be more versatile if it also included a way to efficiently pass information about the memory map to the guest. That way Xen PVH guests would not be forced to use a hypercall

Re: [Xen-devel] [PATCH for-next 15/16] xen/arm: traps: Move the definition of mmio_info_t in try_handle_mmio

2017-12-07 Thread Stefano Stabellini
On Thu, 23 Nov 2017, Julien Grall wrote: > mmio_info_t is currently filled by do_trap_data_guest_abort but only > important when emulation an MMIO region. > > A follow-up patch will merge stage-2 prefetch abort and stage-2 data abort > in a single helper. To prepare that, mmio_info_t is now

Re: [Xen-devel] [PATCH for-next 12/16] xen/arm: p2m: Introduce p2m_tlb_flush_sync, export it and use it

2017-12-07 Thread Stefano Stabellini
On Thu, 23 Nov 2017, Julien Grall wrote: > Multiple places in the code requires to flush the TLBs wonly when ^ only Aside from this Reviewed-by: Stefano Stabellini > p2m->need_flush is set. > > Rather than

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

2017-12-07 Thread Maran Wilson
Just FYI: I sent out a v2 of this patch but in doing so I moved a few people from the "to" line to the "cc" line. For anyone who previously did not comment but still wanted to follow the discussion, here's the link to the v2 email: https://lkml.org/lkml/2017/12/7/1624 Thanks, -Maran On

Re: [Xen-devel] [PATCH] xen/arm: gic-v3: Bail out if gicv3_cpu_init fail

2017-12-07 Thread Stefano Stabellini
On Wed, 6 Dec 2017, Julien Grall wrote: > From: Julien Grall > > When system registers are not enabled, all the access to them will trap ^ accesses > in EL2. In Xen, system registers will be enabled by gicv3_cpu_init only > on

Re: [Xen-devel] [PATCH for-next 06/16] xen/arm: Extend copy_to_guest to support copying from/to guest physical address

2017-12-07 Thread Stefano Stabellini
On Wed, 6 Dec 2017, Julien Grall wrote: > Hi Stefano, > > On 12/06/2017 01:22 AM, Stefano Stabellini wrote: > > On Thu, 23 Nov 2017, Julien Grall wrote: > > > The only differences between copy_to_guest and access_guest_memory_by_ipa > > > are: > > > - The latter does not support copying data

Re: [Xen-devel] [PATCH for-next 13/16] xen/arm: p2m: Fold p2m_tlb_flush into p2m_force_tlb_flush_sync

2017-12-07 Thread Stefano Stabellini
On Thu, 23 Nov 2017, Julien Grall wrote: > p2m_tlb_flush is called in 2 places: p2m_alloc_table and > p2m_force_tlb_flush_sync. > > p2m_alloc_table is called when the domain is initialized and could be > replace by a call to p2m_force_tlb_flush_sync with the P2M write locked. > > This seems a

[Xen-devel] [PATCH V1 1/1] Xen/libxl: Perform PCI reset using 'reset' SysFS attribute

2017-12-07 Thread Govinda Tatti
The life-cycle of a PCI device in Xen pciback is complex and is constrained by the generic PCI locking mechanism. - It starts with the device being bound to us, for which we do a function reset (done via SysFS so the PCI lock is held). - If the device is unbound from us, we also do a function

Re: [Xen-devel] [PATCH] xen/arm64: head.S: Introduce macro to load the physical address of a symbol

2017-12-07 Thread Stefano Stabellini
On Thu, 7 Dec 2017, Julien Grall wrote: > A lot of places in the ARM64 assembly code requiring to load the > physical address of a symbol. Rather than open-coding the translation, > introduce a new macro that will load the physical address of a symbol. > > Lastly, use this new macro to replace

Re: [Xen-devel] [PATCH] xen/arm: Remove unused fixmap slots

2017-12-07 Thread Stefano Stabellini
On Thu, 7 Dec 2017, Julien Grall wrote: > There are quite a few fixmap slots that have not been used for a while. > Remove them. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > xen/include/asm-arm/config.h | 9

[Xen-devel] [xen-unstable-smoke test] 116956: tolerable all pass - PUSHED

2017-12-07 Thread osstest service owner
flight 116956 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/116956/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl

Re: [Xen-devel] [PATCH v2 3/3] x86/xen: supply rsdp address in boot params for pvh guests

2017-12-07 Thread Ingo Molnar
* Juergen Gross wrote: > When booted via the special PVH entry save the RSDP address set in the > boot information block in struct boot_params. This will enable Xen to > locate the RSDP at an arbitrary address. > > Set the boot loader version to 2.14 (0x020e) replacing the

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

2017-12-07 Thread Jan Beulich
>>> On 07.12.17 at 19:32, wrote: > 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

Re: [Xen-devel] [PATCH v2 2/3] x86/acpi: take rsdp address for boot params if available

2017-12-07 Thread Ingo Molnar
* Juergen Gross wrote: > In case the rsdp address in struct boot_params is specified don't try > to find the table by searching, but take the address directly as set > by the boot loader. > > Signed-off-by: Juergen Gross > --- > drivers/acpi/osl.c | 8

Re: [Xen-devel] [PATCH v2 1/3] x86/boot: add acpi rsdp address to setup_header

2017-12-07 Thread Ingo Molnar
* Juergen Gross wrote: > Xen PVH guests receive the address of the RSDP table from Xen. In order > to support booting a Xen PVH guest via grub2 using the standard x86 > boot entry we need a way fro grub2 to pass the RSDP address to the > kernel. > > For this purpose expand the

Re: [Xen-devel] [RFC PATCH 06/31] cpufreq: make cpufreq driver more generalizable

2017-12-07 Thread Jan Beulich
>>> On 07.12.17 at 00:44, wrote: > Oleksandr would like to call set_px_pminfo from a non-hypercall context, > meaning that there are no XEN_GUEST_HANDLE parameters. Today, struct > xen_processor_performance contains a > > XEN_GUEST_HANDLE(xen_processor_px_t) states; >

Re: [Xen-devel] [PATCH v2 07/13] iommu: Make decision about needing IOMMU for hardware domains in advance

2017-12-07 Thread Jan Beulich
>>> On 06.12.17 at 20:23, wrote: > On Wed, Dec 6, 2017 at 7:01 PM, Jan Beulich wrote: > On 25.07.17 at 19:26, wrote: >>> @@ -175,37 +182,6 @@ void __hwdom_init iommu_hwdom_init(struct domain *d) >>> return; >>> >>>

Re: [Xen-devel] [RFC Patch v4 2/8] ioreq: bump the number of IOREQ page to 4 pages

2017-12-07 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Paul Durrant > Sent: 06 December 2017 16:10 > To: 'Chao Gao' > Cc: Stefano Stabellini ; Wei Liu > ; Andrew Cooper

Re: [Xen-devel] [PATCH v14 04/11] x86/hvm/ioreq: defer mapping gfns until they are actually requsted

2017-12-07 Thread Paul Durrant
> -Original Message- > From: Chao Gao [mailto:chao@intel.com] > Sent: 06 December 2017 21:50 > To: Paul Durrant > Cc: xen-devel@lists.xenproject.org; Stefano Stabellini > ; George Dunlap ; > Andrew Cooper

[Xen-devel] [PATCH v2 2/3] x86/acpi: take rsdp address for boot params if available

2017-12-07 Thread Juergen Gross
In case the rsdp address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Signed-off-by: Juergen Gross --- drivers/acpi/osl.c | 8 1 file changed, 8 insertions(+) diff --git

Re: [Xen-devel] [OSSTEST RFC 13/16] WORKAROUND: Osstest/TestSupport: Make target_reboot works with systemd

2017-12-07 Thread Ian Jackson
Anthony PERARD writes ("[OSSTEST RFC 13/16] WORKAROUND: Osstest/TestSupport: Make target_reboot works with systemd"): > On host running with systemd as init, doing `ssh host reboot` will > result in ssh returning an error. > This patch works around by not waiting for the reboot command to return.

[Xen-devel] [PATCH v3 06/25] x86emul: support most remaining AVX2 insns

2017-12-07 Thread Jan Beulich
I.e. those not being equivalents of SSEn ones, but with the exception of the various gather operations. Signed-off-by: Jan Beulich --- v3: vbroadcasts{d,s} support register operands as of AVX2. Re-base. v2: Add all vpmaskmov{d,q} handling here. ---

Re: [Xen-devel] [RFC PATCH v4] xen: credit2: provide custom option to create runqueue

2017-12-07 Thread Dario Faggioli
On Tue, 2017-12-05 at 21:58 +0530, Praveen Kumar wrote: > On Tue, Sep 5, 2017 at 11:26 PM, Dario Faggioli > wrote: > > > > I'm asking because I do have it half done myself, and it would not > > take > > too much time to me to finish it. > > > > If you're still on it,

[Xen-devel] [PATCH v3 23/25] x86/HVM: make use of new read-modify-write emulator hook

2017-12-07 Thread Jan Beulich
..., at least as far as currently possible, i.e. when a mapping can be obtained. Signed-off-by: Jan Beulich --- v3: New. --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -1187,6 +1187,61 @@ static int hvmemul_write( return X86EMUL_OKAY; } +static

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Jan Beulich
>>> On 07.12.17 at 16:22, wrote: > On 07/12/17 09:39, Jan Beulich wrote: > On 06.12.17 at 18:52, wrote: >>> But I think this is bringing another class of problem. When a >>> misconfigured is accessed, we would need to clean & invalidate the

[Xen-devel] [PATCH v3 25/25] x86/shadow: fold sh_x86_emulate_{write, cmpxchg}() into their only callers

2017-12-07 Thread Jan Beulich
The functions have a single caller only and are now guest paging type independent (except for the tracing part), so have no need to exist as standalone ones, let alone multiple times. Replace the two prior hooks with just a single one for dealing with tracing. Signed-off-by: Jan Beulich

[Xen-devel] [PATCH v3 24/25] x86/shadow: fully move unmap-dest into common code

2017-12-07 Thread Jan Beulich
By adding guest PTE size to shadow emulation context, the work begun by commit 2c80710a78 ("x86/shadow: compile most write emulation code just once") can be completed, paving the road for further movement into common code. Signed-off-by: Jan Beulich --- v3: New. ---

Re: [Xen-devel] [PATCH v3 22/25] x86/HVM: do actual CMPXCHG in hvmemul_cmpxchg()

2017-12-07 Thread Razvan Cojocaru
On 12/07/2017 04:16 PM, Jan Beulich wrote: > ..., at least as far as currently possible, i.e. when a mapping can be > obtained. > > Signed-off-by: Jan Beulich Thank you for the patch! ___ Xen-devel mailing list

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Marc Zyngier
On 07/12/17 13:52, Julien Grall wrote: > (+ Marc) > > Hi, > > @Marc: My Arm cache knowledge is somewhat limited. Feel free to correct > me if I am wrong. > > Before answering to the rest of the e-mail, let me reinforce what I said > in my first e-mail. Set/Way are very complex to emulate and

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Julien Grall
(+ Marc) @Marc: My Arm cache knowledge is somewhat limited. Feel free to correct me if I am wrong. On 07/12/17 09:39, Jan Beulich wrote: On 06.12.17 at 18:52, wrote: On 12/06/2017 03:15 PM, Jan Beulich wrote: What we do in x86 is that we flag all entries at the

Re: [Xen-devel] [PATCH v6 00/16] xen: common: rbtree: ported updates from Linux tree

2017-12-07 Thread Dario Faggioli
On Tue, 2017-12-05 at 21:49 +0530, Praveen Kumar wrote: > Hi All, > Hi, > Can you please provide your comments over the changes shared. Thanks > in advance. > Sorry, I noticed this series only a few days ago, and was busy. FWIW, I'll try to have a look at the patches next week. BTW, can you

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Jan Beulich
>>> On 07.12.17 at 14:52, wrote: > On 06/12/17 17:49, George Dunlap wrote: >> Do you want to reset the p2m multiple times? I thought the goal was >> simply to keep the amount of p2m space you need to flush to a minimum; >> if you expect the memory which has been faulted

Re: [Xen-devel] [PATCH v2 1/3] x86/crashkernel: avoid Xen image when looking for module/crashkernel position

2017-12-07 Thread Daniel Kiper
On Thu, Dec 07, 2017 at 04:08:31AM -0700, Jan Beulich wrote: > >>> On 04.12.17 at 11:24, wrote: > > --- a/xen/arch/x86/setup.c > > +++ b/xen/arch/x86/setup.c > > @@ -653,7 +653,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) > > module_t *mod = (module_t

[Xen-devel] [RFC QEMU PATCH v4 10/10] xen-hvm: enable building NFIT and SSDT of vNVDIMM for HVM domains

2017-12-07 Thread Haozhong Zhang
When QEMU is used the device model of Xen HVM domain and vNVDIMM devices are present, enable building ACPI tables related to vNVDIMM. Signed-off-by: Haozhong Zhang --- Cc: Stefano Stabellini Cc: Anthony Perard Cc:

[Xen-devel] [RFC QEMU PATCH v4 09/10] nvdimm acpi: add compatibility for 64-bit integer in ACPI 2.0 and later

2017-12-07 Thread Haozhong Zhang
When QEMU is used as Xen device model, the QEMU-built NVDIMM ACPI tables (NFIT and SSDT) may be passed to Xen and merged with Xen-built ACPI tables. However, different ACPI versions are used between QEMU (ACPI 1.0) and Xen (ACPI 2.0), and different integer widths are used between ACPI 1.0 (32

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

2017-12-07 Thread Jan Beulich
>>> On 06.12.17 at 21:06, wrote: > Since c/s 49de10f3c1718 "x86/hvm: Don't raise #GP behind the emulators back > for MSR accesses", returnning X86EMUL_EXCEPTION has pushed the exception > generation to the top of the call tree. > > Using hvm_inject_hw_exception() and

[Xen-devel] [RFC QEMU PATCH v4 05/10] xen-hvm: initialize fw_cfg interface

2017-12-07 Thread Haozhong Zhang
Xen is going to reuse QEMU to build ACPI of some devices (e.g., NFIT and SSDT for NVDIMM) for HVM domains. The existing QEMU ACPI build code requires a fw_cfg interface which will also be used to pass QEMU built ACPI to Xen. Therefore, we need to initialize fw_cfg when any ACPI is going to be

[Xen-devel] [RFC QEMU PATCH v4 03/10] hostmem-xen: add a host memory backend for Xen

2017-12-07 Thread Haozhong Zhang
vNVDIMM requires a host memory backend to allocate its backend resources to the guest. When QEMU is used as Xen device model, the backend resource allocation of vNVDIMM is managed out of QEMU. A new host memory backend 'memory-backend-xen' is introduced to represent the backend resource allocated

[Xen-devel] [RFC QEMU PATCH v4 06/10] hw/acpi-build, xen-hvm: introduce a Xen-specific ACPI builder

2017-12-07 Thread Haozhong Zhang
QEMU on KVM/TCG and Xen requires different sets of guest ACPI tables. When QEMU builds ACPI for Xen HVM domains, the new Xen-specific ACPI build function xen_acpi_build() is called instead of the existing path from acpi_build(). Signed-off-by: Haozhong Zhang --- Cc:

Re: [Xen-devel] [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init()

2017-12-07 Thread Oleksandr Tyshchenko
On Thu, Dec 7, 2017 at 12:49 AM, Julien Grall wrote: > Hi, Hi Julien, Jan > > > On 12/06/2017 07:53 PM, Oleksandr Tyshchenko wrote: >> >> On Wed, Dec 6, 2017 at 6:51 PM, Jan Beulich wrote: >> >> On 25.07.17 at 19:26,

[Xen-devel] [RFC XEN PATCH v4 26/41] tools/xl: add option '--data | -d' to xl command pmem-list

2017-12-07 Thread Haozhong Zhang
'xl pmem-list --data | -d' is used to list all data PMEM regions. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_nvdimm.c | 4 tools/libxl/libxl_types.idl | 9 +

[Xen-devel] [RFC XEN PATCH v4 40/41] tools/libxl: initiate PMEM mapping via QMP callback

2017-12-07 Thread Haozhong Zhang
The base guest physical address of each vNVDIMM device is decided by QEMU. Add a QMP callback to get the base address from QEMU and query Xen hypervisor to map host PMEM pages to that address. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson

[Xen-devel] [RFC XEN PATCH v4 29/41] xen: add hypercall XENMEM_populate_pmem_map

2017-12-07 Thread Haozhong Zhang
This hypercall will be used by device models to map host PMEM pages to guest. Signed-off-by: Haozhong Zhang --- Cc: Daniel De Graaf Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper

[Xen-devel] [RFC XEN PATCH v4 27/41] xen/pmem: add function to map PMEM pages to HVM domain

2017-12-07 Thread Haozhong Zhang
pmem_populate() is added to map the specifed data PMEM pages to a HVM domain. No called is added in this commit. Signed-off-by: Haozhong Zhang --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson

[Xen-devel] [RFC XEN PATCH v4 22/41] xen/pmem: support setup PMEM region for guest data usage

2017-12-07 Thread Haozhong Zhang
Allow the command XEN_SYSCTL_nvdimm_pmem_setup of hypercall XEN_SYSCTL_nvdimm_op to setup a PMEM region for guest data usage. After the setup, that PMEM region will be able to be mapped to guest address space. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson

[Xen-devel] [RFC XEN PATCH v4 41/41] tools/libxl: build qemu options from xl vNVDIMM configs

2017-12-07 Thread Haozhong Zhang
For xl configs vnvdimms = [ 'type=mfn,backend=$PMEM0_MFN,nr_pages=$N0', ... ] the following qemu options will be built -machine ,nvdimm -m ,slots=$NR_SLOTS,maxmem=$MEM_SIZE -object memory-backend-xen,id=mem1,host-addr=$PMEM0_ADDR,size=$PMEM0_SIZE -device

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

2017-12-07 Thread Jan Beulich
>>> On 06.12.17 at 21:06, wrote: > @@ -2937,12 +2933,12 @@ static int vmx_msr_read_intercept(unsigned int msr, > uint64_t *msr_content) > goto done; > switch ( long_mode_do_msr_read(msr, msr_content) ) > { > -case

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

2017-12-07 Thread Jan Beulich
>>> On 06.12.17 at 20:34, wrote: > On 06/12/17 16:37, Jan Beulich wrote: >> @@ -172,6 +173,24 @@ static inline unsigned long rdgsbase(voi >> return base; >> } >> >> +static inline unsigned long rdgsshadow(void) >> +{ >> +unsigned long base; >> + >> +

Re: [Xen-devel] [PATCH v2 4/6] iommu: Remove dependency on __LINE__ for release builds

2017-12-07 Thread Jan Beulich
>>> On 09.03.17 at 11:42, wrote: On 08.03.17 at 18:46, wrote: > > When seeing the title I wondered by I didn't get Cc-ed. Perhaps the > prefix would better have been VT-d: ? > > > --- a/xen/drivers/passthrough/vtd/dmar.h > > +++

Re: [Xen-devel] [OSSTEST RFC 02/16] Osstest/TestSupport: In teditfileex, get the file with the requested user

2017-12-07 Thread Ian Jackson
Anthony PERARD writes ("[OSSTEST RFC 02/16] Osstest/TestSupport: In teditfileex, get the file with the requested user"): > e.g. If the file to be edited is only accessible to the root user, > target_getfile() would not work. Acked-by: Ian Jackson

Re: [Xen-devel] [OSSTEST RFC 01/16] JobDB-Standalone.tcl: Fix read-runvar

2017-12-07 Thread Ian Jackson
Anthony PERARD writes ("[OSSTEST RFC 01/16] JobDB-Standalone.tcl: Fix read-runvar"): > This fix the error bellow, when the runvar exist: > can't read "runvarinfo()": no such element in array *boggle* Acked-by: Ian Jackson

[Xen-devel] [linux-3.18 test] 116920: tolerable FAIL - PUSHED

2017-12-07 Thread osstest service owner
flight 116920 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/116920/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 10 windows-install fail in 116890 pass in 116920

[Xen-devel] [RFC XEN PATCH v4 00/41] Add vNVDIMM support to HVM domains

2017-12-07 Thread Haozhong Zhang
All patches can also be found at Xen: https://github.com/hzzhan9/xen.git nvdimm-rfc-v4 QEMU: https://github.com/hzzhan9/qemu.git xen-nvdimm-rfc-v4 RFC v3 can be found at https://lists.xen.org/archives/html/xen-devel/2017-09/msg00964.html Changes in v4: * Move the functionality of

[Xen-devel] [RFC XEN PATCH v4 10/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_get_rgions_nr

2017-12-07 Thread Haozhong Zhang
XEN_SYSCTL_nvdimm_pmem_get_rgions_nr, which is a command of hypercall XEN_SYSCTL_nvdimm_op, is to get the number of PMEM regions of the specified type (see PMEM_REGION_TYPE_*). Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu

[Xen-devel] [RFC XEN PATCH v4 07/41] xen/pmem: register valid PMEM regions to Xen hypervisor

2017-12-07 Thread Haozhong Zhang
Register valid PMEM regions probed via NFIT to Xen hypervisor. No frametable and M2P table are created for those PMEM regions at this stage. Signed-off-by: Haozhong Zhang --- Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [RFC XEN PATCH v4 04/41] xen/common: add Kconfig item for pmem support

2017-12-07 Thread Haozhong Zhang
Add CONFIG_PMEM to enable NVDIMM persistent memory support. By default, it's N. Signed-off-by: Haozhong Zhang --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich

[Xen-devel] [RFC QEMU PATCH v4 02/10] xen-hvm: create the hotplug memory region on Xen

2017-12-07 Thread Haozhong Zhang
The guest physical address of vNVDIMM is allocated from the hotplug memory region, which is not created when QEMU is used as Xen device model. In order to use vNVDIMM for Xen HVM domains, this commit reuses the code for pc machine type to create the hotplug memory region for Xen HVM domains.

[Xen-devel] [RFC QEMU PATCH v4 04/10] nvdimm: do not intiailize nvdimm->label_data if label size is zero

2017-12-07 Thread Haozhong Zhang
The memory region of vNVDIMM on Xen is a RAM memory region, so memory_region_get_ram_ptr() cannot be used in nvdimm_realize() to get a pointer to the label data area in that region. To be worse, it may abort QEMU. As Xen currently does not support labels (i.e. label size is 0) and every access in

[Xen-devel] [RFC QEMU PATCH v4 08/10] nvdimm acpi: add functions to access DSM memory on Xen

2017-12-07 Thread Haozhong Zhang
Xen hvmloader can load QEMU-built NVDIMM ACPI tables via the BIOSLinkerLoader interface, but it allocates memory in an area not covered by any memory regions in QEMU, i.e., the hvmloader memory cannot be accessed via the normal cpu_physical_memory_{read,write}(). If QEMU on Xen has to access the

[Xen-devel] [RFC QEMU PATCH v4 00/10] Implement vNVDIMM for Xen HVM guest

2017-12-07 Thread Haozhong Zhang
This is the QEMU part patches that works with the associated Xen patches to enable vNVDIMM support for Xen HVM domains. Xen relies on QEMU to build guest NFIT and NVDIMM namespace devices, and allocate guest address space for vNVDIMM devices. All patches can also be found at Xen:

Re: [Xen-devel] [PATCH v2 1/3] x86/crashkernel: avoid Xen image when looking for module/crashkernel position

2017-12-07 Thread Jan Beulich
>>> On 04.12.17 at 11:24, wrote: > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -653,7 +653,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) > module_t *mod = (module_t *)__va(mbi->mods_addr); > unsigned long nr_pages, raw_max_page,

Re: [Xen-devel] [OSSTEST RFC 04/16] TestSupport: In host_install_postboot, don't call update-rc.d on CentOS

2017-12-07 Thread Ian Jackson
Anthony PERARD writes ("[OSSTEST RFC 04/16] TestSupport: In host_install_postboot, don't call update-rc.d on CentOS"): > Signed-off-by: Anthony PERARD At the very least, this needs an explanation of how, on CentOS, the same effect is achieved. Thanks, Ian.

Re: [Xen-devel] [OSSTEST RFC 09/16] CentOS: Setup osstest-confirm-booted.service

2017-12-07 Thread Ian Jackson
Anthony PERARD writes ("[OSSTEST RFC 09/16] CentOS: Setup osstest-confirm-booted.service"): > This emulate the osstest-confirm-booted service that is done on Debian. > > In order to have the service been started last: > - it is made dependent on multi-user.target which is the default target on

[Xen-devel] [distros-debian-wheezy test] 72524: all pass

2017-12-07 Thread Platform Team regression test user
flight 72524 distros-debian-wheezy real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72524/ Perfect :-) All tests in this flight passed as required baseline version: flight 72501 jobs: build-amd64 pass

[Xen-devel] [RFC XEN PATCH v4 11/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_get_regions

2017-12-07 Thread Haozhong Zhang
XEN_SYSCTL_nvdimm_pmem_get_regions, which is a command of hypercall XEN_SYSCTL_nvdimm_op, is to get a list of PMEM regions of specified type (see PMEM_REGION_TYPE_*). Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu

[Xen-devel] [RFC XEN PATCH v4 03/41] hvmloader/util: do not compare characters after '\0' in strncmp

2017-12-07 Thread Haozhong Zhang
... to make its behavior the same as C standard (e.g., C99 and C11). Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu ---

[Xen-devel] [RFC XEN PATCH v4 14/41] x86_64/mm: allow customized location of extended frametable and M2P table

2017-12-07 Thread Haozhong Zhang
As the existing data in PMEM region is persistent, Xen hypervisor has no knowledge of which part is free to be used for the frame table and M2P table of that PMEM region. Instead, we will allow users or system admins to specify the location of those frame table and M2P table. The location is not

[Xen-devel] [RFC XEN PATCH v4 06/41] acpi: probe valid PMEM regions via NFIT

2017-12-07 Thread Haozhong Zhang
A PMEM region with failures (e.g., not properly flushed in the last power cycle, or some blocks within it are borken) cannot be safely used by Xen and guest. Scan the state flags of NVDIMM region mapping structures in NFIT to check whether any failures happened to a PMEM region. The recovery of

[Xen-devel] [RFC XEN PATCH v4 05/41] x86/mm: exclude PMEM regions from initial frametable

2017-12-07 Thread Haozhong Zhang
No specification defines that PMEM regions cannot appear in margins between RAM regions. If that does happen, init_frametable() will need to allocate RAM for the part of frametable of PMEM regions. However, PMEM regions can be very large (several terabytes or more), so init_frametable() may fail.

[Xen-devel] [RFC XEN PATCH v4 09/41] xen/pmem: add framework for hypercall XEN_SYSCTL_nvdimm_op

2017-12-07 Thread Haozhong Zhang
XEN_SYSCTL_nvdimm_op will support a set of sub-commands to manage the physical NVDIMM devices. This commit just adds the framework for this hypercall, and does not implement any sub-commands. Signed-off-by: Haozhong Zhang --- Cc: Daniel De Graaf

[Xen-devel] [RFC XEN PATCH v4 23/41] tools/xl: add option '--data | -d' to xl command pmem-setup

2017-12-07 Thread Haozhong Zhang
'xl pmem-setup --data | -d' is used to setup the specified PMEM region for guest data usage. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.h| 17 +

[Xen-devel] [RFC XEN PATCH v4 32/41] tools/libacpi: build a DM ACPI signature blacklist

2017-12-07 Thread Haozhong Zhang
Some guest ACPI tables are built by Xen and should not be loaded from device model (DM). We add signatures of Xen-built ACPI tables except SSDT in a blacklist, so that we can check DM-built ACPI tables against it later. Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich

[Xen-devel] [RFC XEN PATCH v4 21/41] tools/xl: add option '--mgmt | -m' to xl command pmem-list

2017-12-07 Thread Haozhong Zhang
'xl pmem-list --mgmt | -m' is used to list all management regions. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_nvdimm.c | 4 tools/libxl/libxl_types.idl | 8

[Xen-devel] [RFC XEN PATCH v4 34/41] tools/libacpi: probe QEMU ACPI ROMs via fw_cfg interface

2017-12-07 Thread Haozhong Zhang
Probe following QEMU ACPI ROMs: * etc/acpi/rsdp: QEMU RSDP, which is used to iterate other QEMU ACPI tables in etc/acpi/tables * etc/acpi/tables: other QEMU ACPI tables * etc/table-loader:QEMU BIOSLinkerLoader ROM, which can be

[Xen-devel] [RFC XEN PATCH v4 20/41] xen/pmem: support PMEM_REGION_TYPE_MGMT for XEN_SYSCTL_nvdimm_pmem_get_regions

2017-12-07 Thread Haozhong Zhang
Allow XEN_SYSCTL_nvdimm_pmem_get_regions to return a list of management PMEM regions. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [RFC XEN PATCH v4 37/41] tools/libacpi: load QEMU ACPI

2017-12-07 Thread Haozhong Zhang
If libacpi detects QEMU fw_cfg interface, it will try to detect and execute QEMU BIOSLinkerLoader ROM to load QEMU-built ACPI. If any QEMU ACPI table is conflict with Xen-built ACPI tables, libacpi will refuse to load all QEMU ACPI tables. Signed-off-by: Haozhong Zhang

[Xen-devel] [RFC XEN PATCH v4 35/41] tools/libacpi: add a QEMU BIOSLinkLoader executor

2017-12-07 Thread Haozhong Zhang
The executor loads and executes the QEMU BIOSLinkerLoader ROM etc/table-loader. It currently supports three BIOSLinkerLoader commands ALLOCATE, POINTER and CHECKSUM, which are enough to load currently supported QEMU ROMs. Signed-off-by: Haozhong Zhang --- Cc: Jan

[Xen-devel] [RFC XEN PATCH v4 08/41] xen/pmem: hide NFIT and deny access to PMEM from Dom0

2017-12-07 Thread Haozhong Zhang
... to avoid the inference with the PMEM driver and management utilities in Dom0. Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson

[Xen-devel] [RFC XEN PATCH v4 01/41] x86_64/mm: fix the PDX group check in mem_hotadd_check()

2017-12-07 Thread Haozhong Zhang
The current check refuses the hot-plugged memory that falls in one unused PDX group, which should be allowed. Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/x86_64/mm.c | 6 +- 1

[Xen-devel] [RFC XEN PATCH v4 13/41] x86_64/mm: refactor memory_add()

2017-12-07 Thread Haozhong Zhang
Separate the revertible part of memory_add_common(), which will also be used in PMEM management. The separation will ease the failure recovery in PMEM management. Several coding-style issues in the touched code are fixed as well. No functional change is introduced. Signed-off-by: Haozhong Zhang

[Xen-devel] [RFC XEN PATCH v4 31/41] tools/libacpi: add callback to translate GPA to GVA

2017-12-07 Thread Haozhong Zhang
The location of ACPI blobs passed from device modeil is offered in guest physical address. libacpi needs to convert the guest physical address to guest virtual address before it can access those ACPI blobs. Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich

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

2017-12-07 Thread Jan Beulich
>>> On 06.12.17 at 19:47, wrote: > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

[Xen-devel] [RFC XEN PATCH v4 30/41] tools: reserve extra guest memory for ACPI from device model

2017-12-07 Thread Haozhong Zhang
The device model may need extra guest memory to store the generated data when building guest ACPI. For example, QEMU puts the unpatched ACPI and BIOSLinkerLoader ROMs in guest memory, which can be patched and loaded by the guest firmware later. Though the default value can be implied from the type

[Xen-devel] [RFC XEN PATCH v4 16/41] tools/xl: accept all bases in parse_ulong()

2017-12-07 Thread Haozhong Zhang
Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/xl/xl_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index

[Xen-devel] [RFC XEN PATCH v4 15/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_setup to setup management PMEM region

2017-12-07 Thread Haozhong Zhang
Add a command XEN_SYSCTL_nvdimm_pmem_setup to hypercall XEN_SYSCTL_nvdimm_op to setup the frame table and M2P table of a PMEM region. This command is currently used to setup the management PMEM region which is used to store the frame table and M2P table of other PMEM regions and itself. The

[Xen-devel] [RFC XEN PATCH v4 24/41] xen/pmem: support PMEM_REGION_TYPE_DATA for XEN_SYSCTL_nvdimm_pmem_get_regions_nr

2017-12-07 Thread Haozhong Zhang
Allow XEN_SYSCTL_nvdimm_pmem_get_regions_nr to return the number of data PMEM regions. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [RFC XEN PATCH v4 25/41] xen/pmem: support PMEM_REGION_TYPE_DATA for XEN_SYSCTL_nvdimm_pmem_get_regions

2017-12-07 Thread Haozhong Zhang
Allow XEN_SYSCTL_nvdimm_pmem_get_regions to return a list of data PMEM regions. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [RFC XEN PATCH v4 17/41] tools/xl: expose parse_ulong()

2017-12-07 Thread Haozhong Zhang
Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/xl/xl_parse.c | 2 +- tools/xl/xl_parse.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/xl/xl_parse.c

[Xen-devel] [RFC XEN PATCH v4 28/41] xen/pmem: release PMEM pages on HVM domain destruction

2017-12-07 Thread Haozhong Zhang
A new step RELMEM_pmem is added and taken before RELMEM_xen to release all PMEM pages mapped to a HVM domain. Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [RFC XEN PATCH v4 12/41] tools/xl: add xl command 'pmem-list'

2017-12-07 Thread Haozhong Zhang
The new xl command 'pmem-list' is used to list the information of PMEM regions. Signed-off-by: Haozhong Zhang --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich

[Xen-devel] [RFC XEN PATCH v4 18/41] tools/xl: add xl command 'pmem-setup'

2017-12-07 Thread Haozhong Zhang
The new xl command 'pmem-setup' with '-m' option is used to setup the specified PMEM region for the management usage. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.h| 13

[Xen-devel] [RFC XEN PATCH v4 36/41] tools/libacpi: add function to get the data of QEMU RSDP

2017-12-07 Thread Haozhong Zhang
Signed-off-by: Haozhong Zhang --- Cc: Jan Beulich Cc: Ian Jackson Cc: Wei Liu --- tools/libacpi/qemu.h| 2 ++ tools/libacpi/qemu_loader.c | 8 tools/libacpi/qemu_stub.c | 5 + 3

[Xen-devel] [RFC XEN PATCH v4 38/41] tools/xl: add xl domain configuration for virtual NVDIMM devices

2017-12-07 Thread Haozhong Zhang
A new xl domain configuration vnvdimms = [ 'type=mfn, backend=START_PMEM_MFN, nr_pages=N', ... ] is added to specify the virtual NVDIMM devices backed by the specified host PMEM pages. As the kernel PMEM driver does not work in Dom0 now, we have to specify MFNs. Signed-off-by: Haozhong Zhang

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

2017-12-07 Thread Jan Beulich
>>> On 06.12.17 at 17:52, wrote: > On 06/12/17 16:27, Jan Beulich wrote: >> On input "c" being 0xff should already have the effect of bailing early >> (due to the isprint()), but let's rather make this explicit. Also >> convert the BUG_ON() to an ASSERT() (nothing fatal

  1   2   >