Re: [Xen-devel] [PATCH v3 08/15] tools: create general interfaces to support psr allocation features

2017-09-22 Thread Chao Peng
On Tue, 2017-09-19 at 11:04 +0100, Roger Pau Monné wrote: > On Tue, Sep 05, 2017 at 05:32:30PM +0800, Yi Sun wrote: > > > > This patch creates general interfaces in libxl to support all psr > > allocation features. > > > > Add 'LIBXL_HAVE_PSR_GENERIC' to indicate interface change. > > > > Please

Re: [Xen-devel] pci-passthrough loses msi-x interrupts ability after domain destroy

2017-09-22 Thread Sander Eikelenboom
On 22/09/17 04:09, Christopher Clark wrote: > On Thu, Sep 21, 2017 at 1:27 PM, Sander Eikelenboom > wrote: >> >> On Thu, September 21, 2017, 10:39:52 AM, Roger Pau Monné wrote: >> >>> On Wed, Sep 20, 2017 at 03:50:35PM -0400, Jérôme Oufella wrote: I'm using PCI pass-through to map a PCIe

[Xen-devel] [ovmf bisection] complete build-i386-xsm

2017-09-22 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-i386-xsm testid xen-build Tree: ovmf https://github.com/tianocore/edk2.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: xen git://xenbits.xen.org/xen.git *** Found and reproduced

Re: [Xen-devel] [PATCH v8 13/15] xen: make grant resource limits per domain

2017-09-22 Thread Jan Beulich
>>> On 22.09.17 at 08:19, wrote: > On 21/09/17 13:48, Jan Beulich wrote: > On 21.09.17 at 13:39, wrote: >>> On 21/09/17 13:31, Jan Beulich wrote: >>> On 21.09.17 at 09:53, wrote: > On 21/09/17 08:15, Jan Beulich wrote: > On 21.09.17 at 06:35, wrote: >>> On 20/09/17 17:35

Re: [Xen-devel] [PATCH v6 03/10] public: xen.h: add definitions for UUID handling

2017-09-22 Thread Jan Beulich
>>> On 21.09.17 at 21:59, wrote: > --- a/xen/include/public/xen.h > +++ b/xen/include/public/xen.h > @@ -930,6 +930,33 @@ __DEFINE_XEN_GUEST_HANDLE(uint16, uint16_t); > __DEFINE_XEN_GUEST_HANDLE(uint32, uint32_t); > __DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t); > > +typedef struct > +{ > +u

[Xen-devel] [PATCH 02/27 v10] xen/arm: vpl011: Add SBSA UART emulation in Xen

2017-09-22 Thread Bhupinder Thakur
Add emulation code to emulate read/write access to pl011 registers and pl011 interrupts: - Emulate DR read/write by reading and writing from/to the IN and OUT ring buffers and raising an event to the backend when there is data in the OUT ring buffer and injecting an interrupt

[Xen-devel] [PATCH 04/27 v10] xen/arm: vpl011: Add support for vuart in libxl

2017-09-22 Thread Bhupinder Thakur
An option is provided in libxl to enable/disable SBSA vuart while creating a guest domain. Libxl now supports a generic vuart console and SBSA uart is a specific type. In future support can be added for multiple vuart of different types. User can enable SBSA vuart by adding the following line in

[Xen-devel] [PATCH 13/27 v10] xen/arm: vpl011: Add a new maybe_add_console_evtchn_fd function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new maybe_add_console_evtchn_fd function. This function adds the console event channel FD to list of polled FDs. Signed-off-by: Bhupinder Thakur Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v6: - Renamed add_

[Xen-devel] [PATCH 00/27 v10] SBSA UART emulation support in Xen

2017-09-22 Thread Bhupinder Thakur
SBSA UART emulation for guests in Xen == Linaro has published VM System specification for ARM Processors, which provides a set of guidelines for both guest OS and hypervisor implementations, such that building OS images according to these guidelines guarantees t

[Xen-devel] [PATCH 15/27 v10] xen/arm: vpl011: Add a new console_evtchn_unmask function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new console_evtchn_unmask function. This function unmasks the console event channel if it is masked for some timeout period. One optimization that has been done is to merge the two for loops. One for loop was used to iterate through all domains and unmask the domain event

[Xen-devel] [PATCH 09/27 v10] xen/arm: vpl011: Rename the console structure field conspath to xspath

2017-09-22 Thread Bhupinder Thakur
The console->conspath name is changed to console->xspath as it is clear from the name that it is referring to xenstore path. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes sin

[Xen-devel] [PATCH 19/27 v10] xen/arm: vpl011: Add a new console_open_log function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a console_open_log console_cleanup function. This function opens the console log file. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Split t

[Xen-devel] [PATCH 06/27 v10] xen/arm: vpl011: Add a new domctl API to initialize vpl011

2017-09-22 Thread Bhupinder Thakur
Add a new domctl API to initialize vpl011. It takes the GFN and console backend domid as input and returns an event channel to be used for sending and receiving events from Xen. Xen will communicate with xenconsole using GFN as the ring buffer and the event channel to transmit and receive pl011 da

[Xen-devel] [PATCH 08/27 v10] xen/arm: vpl011: Modify xenconsole to define and use a new console structure

2017-09-22 Thread Bhupinder Thakur
Xenconsole uses a domain structure which contains console specific fields. This patch defines a new console structure, which would be used by the xenconsole functions to perform console specific operations like reading/writing data from/to the console ring buffer or reading/writing data from/to co

[Xen-devel] [PATCH 20/27 v10] xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a console_close_evtchn function. This function closes the console event channel. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Split this ch

[Xen-devel] [PATCH 01/27 v10] xen/arm: vpl011: Define common ring buffer helper functions in console.h

2017-09-22 Thread Bhupinder Thakur
DEFINE_XEN_FLEX_RING(xencons) defines common helper functions such as xencons_queued() to tell the current size of the ring buffer, xencons_mask() to mask off the index, which are useful helper functions. pl011 emulation code will use these helper functions. io/console.h includes io/ring.h which d

[Xen-devel] [PATCH 10/27 v10] xen/arm: vpl011: Modify xenconsole functions to take console structure as input

2017-09-22 Thread Bhupinder Thakur
Xenconsole functions take domain structure as input. These functions shall be modified to take console structure as input since these functions typically perform console specific operations. Also the console specific functions starting with prefix "domain_" shall be modified to "console_" to ind

[Xen-devel] [PATCH 11/27 v10] xen/arm: vpl011: Add a new console_init function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new console_init function. This function initializes the console structure. Signed-off-by: Bhupinder Thakur Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Split this change in a separate patch. tools/co

[Xen-devel] [PATCH 18/27 v10] xen/arm: vpl011: Add a new console_cleanup function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new console_cleanup function. This function frees up the console resources. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v6: - Removed a null p

[Xen-devel] [PATCH 03/27 v10] xen/arm: vpl011: Allocate a new GFN in the toolstack for vuart

2017-09-22 Thread Bhupinder Thakur
Allocate a new gfn to be used as a ring buffer between xenconsole and Xen for sending/receiving pl011 console data. Signed-off-by: Bhupinder Thakur Acked-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v4: - Rem

[Xen-devel] [PATCH 05/27 v10] xen/arm: vpl011: Rearrange xen header includes in alphabetical order in domctl.c

2017-09-22 Thread Bhupinder Thakur
Rearrange xen header includes in alphabetical order in domctl.c. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Corrected include of in alphabetical order. xen/arch/arm/domctl.c | 6

[Xen-devel] [PATCH 22/27 v10] xen/arm: vpl011: Add support for vuart console in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch finally adds the support for vuart console. It adds two new fields in the console initialization: - optional - use_gnttab optional flag tells whether the console is optional. use_gnttab tells whether the ring buffer should be allocated using grant table. The VUART console is enabled

[Xen-devel] [PATCH 16/27 v10] xen/arm: vpl011: Add a new handle_console_ring function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new handle_console_ring function. This function reads the data from the ring buffer on receiving an event. The initialization of event channel poll fd to -1 is moved inside the handle_console_ring function as they are related. There should be no change in the behavior as th

[Xen-devel] [PATCH 14/27 v10] xen/arm: vpl011: Add a new maybe_add_console_tty_fd function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new maybe_add_console_tty_fd function. This function adds the tty fd to the list of polled fds. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v6

[Xen-devel] [PATCH 21/27 v10] xen/arm: vpl011: Add support for multiple consoles in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch adds the support for multiple consoles and introduces the iterator functions to operate on multiple consoles. The functions called by the iterators check that they are operating on valid I/O parameters. This ensures that if a particular console is not initialized then the functions will

[Xen-devel] [PATCH 07/27 v10] xen/arm: vpl011: Add a new vuart node in the xenstore

2017-09-22 Thread Bhupinder Thakur
Add a new vuart console node to xenstore. This node is added at /local/domain/$DOMID/vuart/0. The node contains information such as the ring-ref, event channel, buffer limit and type of console. Xenconsole reads the node information to setup the ring buffer and event channel for sending/receivin

[Xen-devel] [PATCH 17/27 v10] xen/arm: vpl011: Add a new handle_console_tty function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new handle_console_tty function. This function performs read/write from/to console tty. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Spli

[Xen-devel] [PATCH 12/27 v10] xen/arm: vpl011: Add a new buffer_available function in xenconsole

2017-09-22 Thread Bhupinder Thakur
This patch introduces a new buffer_available function to check if more data is allowed to be buffered. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v5: - Split this ch

[Xen-devel] [PATCH 26/27 v10] xen/arm: vpl011: Fix the slow early console SBSA UART output

2017-09-22 Thread Bhupinder Thakur
The early console output uses pl011_early_write() to write data. This function waits for BUSY bit to get cleared before writing the next byte. In the SBSA UART emulation logic, the BUSY bit was set as soon one byte was written in the FIFO and it remained set until the FIFO was emptied. This meant

[Xen-devel] [PATCH 23/27 v10] xen/arm: vpl011: Add a new vuart console type to xenconsole client

2017-09-22 Thread Bhupinder Thakur
Add a new console type VUART to connect to guest's emualated vuart console. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v4: - Removed the vuart compile time flag so t

[Xen-devel] [PATCH 24/27 v10] xen/arm: vpl011: Add a pl011 uart DT node in the guest device tree

2017-09-22 Thread Bhupinder Thakur
The SBSA UART node format is as specified in Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt and given below: ARM SBSA defined generic UART -- This UART uses a subset of the PL011 registers and consequently lives in the PL011 driver. It's baudrate and other c

[Xen-devel] [PATCH 25/27 v10] xen/arm: vpl011: Update documentation for vuart console support

2017-09-22 Thread Bhupinder Thakur
1. Update documentation for a new vuart option added. 2. Update documentation about SPI irq reserved for vuart. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper CC: George Dunlap CC: Jan Beulich CC: Konrad R

Re: [Xen-devel] Booting signed xen.efi through shim

2017-09-22 Thread Jan Beulich
>>> On 22.09.17 at 00:46, wrote: > One piece that I see still missing is the Xen command line parameters > not being verified. It would be ideal to have the option to get that > set during compile time as well, similar to Linux's CONFIG_CMDLINE > option, to avoid for example getting iommu or XSM b

[Xen-devel] [PATCH 27/27 v10] xen/arm: vpl011: Correct the logic for asserting/de-asserting SBSA UART TX interrupt

2017-09-22 Thread Bhupinder Thakur
This patch fixes the issue observed when pl011 patches were tested on the junos hardware by Andre/Julien. It was observed that when large output is generated such as on running 'find /', output was getting truncated intermittently due to OUT ring buffer getting full. This issue was due to the fac

Re: [Xen-devel] [PATCH v8 13/15] xen: make grant resource limits per domain

2017-09-22 Thread Juergen Gross
On 22/09/17 09:53, Jan Beulich wrote: On 22.09.17 at 08:19, wrote: >> On 21/09/17 13:48, Jan Beulich wrote: >> On 21.09.17 at 13:39, wrote: On 21/09/17 13:31, Jan Beulich wrote: On 21.09.17 at 09:53, wrote: >> On 21/09/17 08:15, Jan Beulich wrote: >> On 21.09.1

Re: [Xen-devel] [PATCH 06/27 v10] xen/arm: vpl011: Add a new domctl API to initialize vpl011

2017-09-22 Thread Jan Beulich
>>> On 22.09.17 at 10:23, wrote: > @@ -119,6 +144,33 @@ long arch_do_domctl(struct xen_domctl *domctl, struct > domain *d, > d->disable_migrate = domctl->u.disable_migrate.disable; > return 0; > > +case XEN_DOMCTL_vuart_op: > +{ > +int rc; > +unsigned i

[Xen-devel] [distros-debian-jessie test] 72137: tolerable trouble: blocked/broken/fail/pass

2017-09-22 Thread Platform Team regression test user
flight 72137 distros-debian-jessie real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72137/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-armhf-jessie-netboot-pygrub 1 build-check(1) blocked n/a build-arm64

Re: [Xen-devel] [PATCH v8 13/15] xen: make grant resource limits per domain

2017-09-22 Thread Jan Beulich
>>> On 22.09.17 at 10:27, wrote: > On 22/09/17 09:53, Jan Beulich wrote: > On 22.09.17 at 08:19, wrote: >>> On 21/09/17 13:48, Jan Beulich wrote: >>> On 21.09.17 at 13:39, wrote: > On 21/09/17 13:31, Jan Beulich wrote: > On 21.09.17 at 09:53, wrote: >>> On 21/09/17 08:15

Re: [Xen-devel] [PATCH v8 13/15] xen: make grant resource limits per domain

2017-09-22 Thread Juergen Gross
On 22/09/17 10:35, Jan Beulich wrote: On 22.09.17 at 10:27, wrote: >> On 22/09/17 09:53, Jan Beulich wrote: >> On 22.09.17 at 08:19, wrote: On 21/09/17 13:48, Jan Beulich wrote: On 21.09.17 at 13:39, wrote: >> On 21/09/17 13:31, Jan Beulich wrote: >> On 21.09.1

Re: [Xen-devel] [PATCH v8 13/15] xen: make grant resource limits per domain

2017-09-22 Thread Jan Beulich
>>> On 22.09.17 at 10:44, wrote: > On 22/09/17 10:35, Jan Beulich wrote: > On 22.09.17 at 10:27, wrote: >>> On 22/09/17 09:53, Jan Beulich wrote: >>> On 22.09.17 at 08:19, wrote: > On 21/09/17 13:48, Jan Beulich wrote: > On 21.09.17 at 13:39, wrote: >>> On 21/09/17 13:31

Re: [Xen-devel] pci-passthrough loses msi-x interrupts ability after domain destroy

2017-09-22 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 10:27:01PM +0200, Sander Eikelenboom wrote: > Roger: > I follow your PVH (dom0) patches shallowly, from my understanding it will > result > in Xen having more inteference with the handling of PCI devices ? Yes, that's correct. > If that's correct will this also impact t

[Xen-devel] [PATCH] x86emul: properly refuse LOCK on most 0FC7 insns

2017-09-22 Thread Jan Beulich
When adding support for RDRAND/RDSEED/RDPID I didn't remember to also update this special early check. Make it (hopefully) future-proof by also refusing VEX-encodings. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -3087,7

[Xen-devel] [PATCH] x86: avoid #GP for PV guest MSR accesses

2017-09-22 Thread Jan Beulich
Halfway recent Linux kernels probe MISC_FEATURES_ENABLES on all CPUs, leading to ugly recovered #GP fault messages with debug builds on older systems. We can do better, so introduce synthetic feature flags for both this and PLATFORM_INFO to avoid the rdmsr_safe() altogether. The rdmsr_safe() uses

[Xen-devel] [PATCH] VMX: PLATFORM_INFO MSR is r/o

2017-09-22 Thread Jan Beulich
Therefore all write attempts should produce #GP, just like on real hardware. Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -3138,10 +3138,7 @@ static int vmx_msr_write_intercept(unsig break; case MSR_INTEL_PLATFORM_INFO: -

[Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-09-22 Thread Lan Tianyu
This patch is to add Xen virtual IOMMU doc to introduce motivation, framework, vIOMMU hypercall and xl configuration. Signed-off-by: Lan Tianyu --- docs/misc/viommu.txt | 136 +++ 1 file changed, 136 insertions(+) create mode 100644 docs/misc/viom

[Xen-devel] [PATCH V3 3/29] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-09-22 Thread Lan Tianyu
This patch is to introduce create, destroy and query capabilities command for vIOMMU. vIOMMU layer will deal with requests and call arch vIOMMU ops. Signed-off-by: Lan Tianyu --- xen/common/domctl.c | 6 ++ xen/common/viommu.c | 30 ++ xen/include

[Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-09-22 Thread Lan Tianyu
This patch is to introduce an abstract layer for arch vIOMMU implementation to deal with requests from dom0. Arch vIOMMU code needs to provide callback to do create and destroy operation. Signed-off-by: Lan Tianyu --- docs/misc/xen-command-line.markdown | 7 ++ xen/arch/x86/Kconfig

[Xen-devel] [PATCH V3 7/29] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-09-22 Thread Lan Tianyu
From: Chao Gao A new logic is added to build ACPI DMAR table in tool stack for a guest with one virtual VTD and pass through it to guest via existing mechanism. If there already are ACPI tables needed to pass through, we joint the tables. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu ---

[Xen-devel] [PATCH V3 6/29] tools/libxl: Add a user configurable parameter to control vIOMMU attributes

2017-09-22 Thread Lan Tianyu
From: Chao Gao A field, viommu_info, is added to struct libxl_domain_build_info. Several attributes can be specified by guest config file for virtual IOMMU. These attributes are used for DMAR construction and vIOMMU creation. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- v3: - allow

[Xen-devel] [PATCH V3 00/29]

2017-09-22 Thread Lan Tianyu
Change since v2: 1) Remove vIOMMU hypercall of query capabilities and introduce when necessary. 2) Remove length field of vIOMMU create parameter of vIOMMU hypercall 3) Introduce irq remapping mode callback to vIOMMU framework and vIOMMU device models can check irq remapping

[Xen-devel] [PATCH V3 4/29] tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures

2017-09-22 Thread Lan Tianyu
From: Chao Gao Add dmar table structure according Chapter 8 "BIOS Considerations" of VTd spec Rev. 2.4. VTd spec:http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/vt-directed-io-spec.pdf Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- tools/libacpi/acp

[Xen-devel] [PATCH V3 11/29] x86/hvm: Introduce a emulated VTD for HVM

2017-09-22 Thread Lan Tianyu
From: Chao Gao This patch adds create/destroy function for the emulated VTD and adapts it to the common VIOMMU abstraction. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- xen/drivers/passthrough/vtd/Makefile | 7 +- xen/drivers/passthrough/vtd/iommu.h | 23 +- xen/drivers/passt

[Xen-devel] [PATCH V3 8/29] tools/libxl: create vIOMMU during domain construction

2017-09-22 Thread Lan Tianyu
From: Chao Gao If guest is configured to have a vIOMMU, create it during domain construction. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- v3: - Remove the process of querying capabilities. --- tools/libxl/libxl_x86.c | 17 + 1 file changed, 17 insertions(+) diff -

[Xen-devel] [PATCH V3 17/29] x86/vvtd: add a helper function to decide the interrupt format

2017-09-22 Thread Lan Tianyu
From: Chao Gao Different platform may use different method to distinguish remapping format interrupt and normal format interrupt. Intel uses one bit in IOAPIC RTE or MSI address register to indicate the interrupt is remapping format. vvtd will handle all the interrupts when .check_irq_remapping(

[Xen-devel] [PATCH V3 13/29] x86/vvtd: Set Interrupt Remapping Table Pointer through GCMD

2017-09-22 Thread Lan Tianyu
From: Chao Gao Software sets this field to set/update the interrupt remapping table pointer used by hardware. The interrupt remapping table pointer is specified through the Interrupt Remapping Table Address (IRTA_REG) register. This patch emulates this operation and adds some new fields in VVTD

[Xen-devel] [PATCH V3 14/29] x86/vvtd: Enable Interrupt Remapping through GCMD

2017-09-22 Thread Lan Tianyu
From: Chao Gao Software writes this field to enable/disable interrupt reampping. This patch emulate IRES field of GCMD. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- xen/drivers/passthrough/vtd/iommu.h | 3 ++- xen/drivers/passthrough/vtd/vvtd.c | 30 +-

[Xen-devel] [PATCH V3 18/29] VIOMMU: Add irq request callback to deal with irq remapping

2017-09-22 Thread Lan Tianyu
This patch is to add irq request callback for platform implementation to deal with irq remapping request. Signed-off-by: Lan Tianyu --- xen/common/viommu.c | 15 + xen/include/asm-x86/viommu.h | 72 xen/include/xen/viommu.h | 11 +

[Xen-devel] [PATCH V3 9/29] tools/libxc: Add viommu operations in libxc

2017-09-22 Thread Lan Tianyu
From: Chao Gao This patch adds XEN_DOMCTL_viommu_op hypercall. This hypercall comprises two sub-commands: - create(): create a vIOMMU in Xen, given viommu type, register-set location and capabilities - destroy(): destroy a vIOMMU specified by viommu_id Signed-off-by: Chao Gao Signed

[Xen-devel] [PATCH V3 23/29] passthrough: move some fields of hvm_gmsi_info to a sub-structure

2017-09-22 Thread Lan Tianyu
From: Chao Gao No functional change. It is a preparation for introducing new fields in hvm_gmsi_info to manage remapping format msi bound to a physical msi. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- xen/arch/x86/hvm/vmsi.c | 4 ++-- xen/drivers/passthrough/io.c | 34 ++

[Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-09-22 Thread Lan Tianyu
From: Chao Gao The BIOS reports the remapping hardware units in a platform to system software through the DMA Remapping Reporting (DMAR) ACPI table. New fields are introduces for DMAR table. These new fields are set by toolstack through parsing guest's config file. construct_dmar() is added to bu

[Xen-devel] [PATCH V3 12/29] x86/vvtd: Add MMIO handler for VVTD

2017-09-22 Thread Lan Tianyu
From: Chao Gao This patch adds VVTD MMIO handler to deal with MMIO access. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- xen/drivers/passthrough/vtd/vvtd.c | 91 ++ 1 file changed, 91 insertions(+) diff --git a/xen/drivers/passthrough/vtd/vvtd.c b

[Xen-devel] [PATCH V3 10/29] vtd: add and align register definitions

2017-09-22 Thread Lan Tianyu
From: Chao Gao No functional changes. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- xen/drivers/passthrough/vtd/iommu.h | 54 + 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.h b/xen/drivers/passt

[Xen-devel] [PATCH V3 22/29] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-09-22 Thread Lan Tianyu
From: Chao Gao When IOAPIC RTE is in remapping format, it doesn't contain the vector of interrupt. For this case, the RTE contains an index of interrupt remapping table where the vector of interrupt is stored. This patchs gets the vector through a vIOMMU interface. Signed-off-by: Chao Gao Signe

[Xen-devel] [PATCH V3 15/29] x86/vvtd: Process interrupt remapping request

2017-09-22 Thread Lan Tianyu
From: Chao Gao When a remapping interrupt request arrives, remapping hardware computes the interrupt_index per the algorithm described in VTD spec "Interrupt Remapping Table", interprets the IRTE and generates a remapped interrupt request. This patch introduces viommu_handle_irq_request() to emu

Re: [Xen-devel] [PATCH v12 1/4] x86emul: New return code for unimplemented instruction

2017-09-22 Thread Jan Beulich
>>> On 21.09.17 at 07:12, wrote: > Changed since v11: > * Fixed double negative in the patch description. > * Move assertion into the switch and use ASSERT_UNREACHABLE() when > applicable. > * Changed the description of X86EMUL_UNIMPLEMENTED / X86EMUL_UNRECOGNIZED > to reflect

[Xen-devel] [PATCH V3 19/29] x86/vioapic: Hook interrupt delivery of vIOAPIC

2017-09-22 Thread Lan Tianyu
From: Chao Gao When irq remapping is enabled, IOAPIC Redirection Entry may be in remapping format. If that, generate an irq_remapping_request and call the common VIOMMU abstraction's callback to handle this interrupt request. Device model is responsible for checking the request's validity. Signe

[Xen-devel] [PATCH V3 25/29] x86/vmsi: Hook delivering remapping format msi to guest

2017-09-22 Thread Lan Tianyu
From: Chao Gao In two situations, hypervisor delivers a msi to a hvm guest. One is when qemu sends a request to hypervisor through XEN_DMOP_inject_msi. The other is when a physical interrupt arrives and it has been bound to a guest msi. For the former, the msi is routed to common vIOMMU layer if

[Xen-devel] [PATCH V3 16/29] x86/vvtd: decode interrupt attribute from IRTE

2017-09-22 Thread Lan Tianyu
From: Chao Gao Without interrupt remapping, interrupt attributes can be extracted from msi message or IOAPIC RTE. However, with interrupt remapping enabled, the attributes are enclosed in the associated IRTE. This callback is for cases in which the caller wants to acquire interrupt attributes, fo

[Xen-devel] [PATCH V3 21/29] VIOMMU: Introduce callback of checking irq remapping mode

2017-09-22 Thread Lan Tianyu
This patch is to add callback for vIOAPIC and vMSI to check whether interrupt remapping is enabled. Signed-off-by: Lan Tianyu --- xen/common/viommu.c | 15 +++ xen/include/xen/viommu.h | 10 ++ 2 files changed, 25 insertions(+) diff --git a/xen/common/viommu.c b/xen/com

[Xen-devel] [PATCH V3 27/29] x86/vvtd: Enable Queued Invalidation through GCMD

2017-09-22 Thread Lan Tianyu
From: Chao Gao Software writes to QIE field of GCMD to enable or disable queued invalidations. This patch emulates QIE field of GCMD. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- xen/drivers/passthrough/vtd/iommu.h | 3 ++- xen/drivers/passthrough/vtd/vvtd.c | 17 +

[Xen-devel] [PATCH V3 29/29] x86/vvtd: save and restore emulated VT-d

2017-09-22 Thread Lan Tianyu
From: Chao Gao Provide a save-restore pair to save/restore registers and non-register status. Signed-off-by: Chao Gao Signed-off-by: Lan Tianyu --- v3: - use one entry to save both vvtd registers and other intermediate state --- xen/drivers/passthrough/vtd/vvtd.c | 66 ++

[Xen-devel] [PATCH V3 26/29] x86/vvtd: Handle interrupt translation faults

2017-09-22 Thread Lan Tianyu
From: Chao Gao Interrupt translation faults are non-recoverable fault. When faults are triggered, it needs to populate fault info to Fault Recording Registers and inject vIOMMU msi interrupt to notify guest IOMMU driver to deal with faults. This patch emulates hardware's handling interrupt trans

[Xen-devel] [PATCH V3 20/29] VIOMMU: Add get irq info callback to convert irq remapping request

2017-09-22 Thread Lan Tianyu
This patch is to add get_irq_info callback for platform implementation to convert irq remapping request to irq info (E,G vector, dest, dest_mode and so on). Signed-off-by: Lan Tianyu --- xen/common/viommu.c | 16 xen/include/asm-x86/viommu.h | 8 xen/include/x

[Xen-devel] [PATCH V3 24/29] tools/libxc: Add a new interface to bind remapping format msi with pirq

2017-09-22 Thread Lan Tianyu
From: Chao Gao When exposing vIOMMU (vvtd) to guest, guest can configure the msi to remapping format. For pass-through device, the physical interrupt now can be bound with remapping format msi. This patch introduce a flag, HVM_IRQ_DPCI_GUEST_REMAPPED, which indicate a physical interrupt is bound

[Xen-devel] [PATCH V3 28/29] x86/vvtd: Add queued invalidation (QI) support

2017-09-22 Thread Lan Tianyu
From: Chao Gao Queued Invalidation Interface is an expanded invalidation interface with extended capabilities. Hardware implementations report support for queued invalidation interface through the Extended Capability Register. The queued invalidation interface uses an Invalidation Queue (IQ), whi

[Xen-devel] [ovmf test] 113705: regressions - FAIL

2017-09-22 Thread osstest service owner
flight 113705 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/113705/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 113647 build-i386-xsm

Re: [Xen-devel] [PATCH v2 04/16] xen/x86: p2m-pod: Fix coding style

2017-09-22 Thread Jan Beulich
>>> On 21.09.17 at 14:40, wrote: > Also take the opportunity to: > - move from 1 << * to 1UL << *. > - use unsigned when possible > - move from unsigned int -> unsigned long for some induction > variables I don't understand this last point, btw - the largest order page the code ne

Re: [Xen-devel] [PATCH v2 11/16] xen/x86: p2m-pod: Clean-up p2m_pod_zero_check

2017-09-22 Thread Jan Beulich
>>> On 21.09.17 at 14:40, wrote: > --- a/xen/arch/x86/mm/p2m-pod.c > +++ b/xen/arch/x86/mm/p2m-pod.c > @@ -861,17 +861,19 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned > long *gfns, int count) > for ( i = 0; i < count; i++ ) > { > p2m_access_t a; > +struct page

Re: [Xen-devel] [PATCH v6 07/11] xen: introduce rangeset_consume_ranges

2017-09-22 Thread Wei Liu
On Thu, Sep 21, 2017 at 03:42:49PM +0100, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 02:53:54PM +0100, Wei Liu wrote: > > On Tue, Sep 19, 2017 at 04:29:32PM +0100, Roger Pau Monne wrote: > > > This function allows to iterate over a rangeset while removing the > > > processed regions. > > > >

Re: [Xen-devel] ARM64:Porting xen to new hardware

2017-09-22 Thread bharat gohil
Hello Wilk, I had try 'console=hvc0' but no success. @Oleksandr: At this moment it is difficult to share any file of guest. It would be helpful if anyone provide me general technique to debug dom0 bringup issue. Thanks, Bharat On Mon, Sep 18, 2017 at 8:16 PM, Konrad Rzeszutek Wilk < konrad.w...

Re: [Xen-devel] [PATCH] x86: avoid #GP for PV guest MSR accesses

2017-09-22 Thread Sergey Dyasli
On Fri, 2017-09-22 at 03:06 -0600, Jan Beulich wrote: > Halfway recent Linux kernels probe MISC_FEATURES_ENABLES on all CPUs, > leading to ugly recovered #GP fault messages with debug builds on older > systems. We can do better, so introduce synthetic feature flags for > both this and PLATFORM_INFO

Re: [Xen-devel] [PATCH] x86: avoid #GP for PV guest MSR accesses

2017-09-22 Thread Jan Beulich
>>> On 22.09.17 at 12:32, wrote: > On Fri, 2017-09-22 at 03:06 -0600, Jan Beulich wrote: >> Halfway recent Linux kernels probe MISC_FEATURES_ENABLES on all CPUs, >> leading to ugly recovered #GP fault messages with debug builds on older >> systems. We can do better, so introduce synthetic feature

[Xen-devel] [xen-unstable test] 113691: regressions - FAIL

2017-09-22 Thread osstest service owner
flight 113691 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/113691/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 113387 test-amd64-i

Re: [Xen-devel] [PATCH v5 01/23] x86/mm: move guest_get_eff_l1e to pv/mm.h

2017-09-22 Thread Jan Beulich
>>> On 14.09.17 at 14:58, wrote: > Mkae it static inline. It well be used by map_ldt_shadow_page and ro "Make" and "will" and ... > page fault emulation code later. > > Signed-off-by: Wei Liu Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-

[Xen-devel] [PATCH] libxl: remove list callback from device framework

2017-09-22 Thread Oleksandr Grytsov
From: Oleksandr Grytsov As we have generic functions to get device list (libxl__device_list) no need to have callback in the framework. To resolve issue when XS entry doesn't match device name, device type is extended with field "entry" which keeps XS entry. Signed-off-by: Oleksandr Grytsov ---

[Xen-devel] [PATCH] remove list callback from device framework

2017-09-22 Thread Oleksandr Grytsov
From: Oleksandr Grytsov We have generic functiont to get/free device list: libxl__device_list and libxl__device_list_free As some devices have different from their name entry in XS (disk -> vbd), getting list function takes XS entry as paramater. This doesn't allow to call libxl__device_list fr

[Xen-devel] [PATCH v9 00/10] xen: better grant v2 support

2017-09-22 Thread Juergen Gross
Currently Linux has no support for grant v2 as this would reduce the maximum number of active grants by a factor of 2 compared to v1, because the number of possible grants are limited by the allowed number of grant frames and grant entries of v2 need twice as much bytes as those of v1. Unfortunate

[Xen-devel] [PATCH v9 07/10] xen: delay allocation of grant table sub structures

2017-09-22 Thread Juergen Gross
Delay the allocation of the grant table sub structures in order to allow modifying parameters needed for sizing of these structures at a per domain basis. Allocate the structures and the table frames only from grant_table_set_limits() (dom0: from grant_table_create()). Signed-off-by: Juergen Gross

[Xen-devel] [PATCH v9 03/10] tools: set grant limits for xenstore stubdom

2017-09-22 Thread Juergen Gross
When creating a Xenstore stubdom set the grant limits: the stubdom will need to setup a very limited amount of grants only, so 4 grant frames are enough. For being able to support up to 32768 domains it will need 128 maptrack frames (1 mapping per domain, 256 maptrack entries per maptrack frame).

[Xen-devel] [PATCH v9 05/10] xl: add global grant limit config items

2017-09-22 Thread Juergen Gross
Add xl.conf config items for default values of grant limits: max_grant_frames will set the default for the maximum number of grant frames for a domain which will take effect if the domain's config file doesn't specify a value. If max_grant_frames isn't set in xl.conf it will default to 32 for host

[Xen-devel] [PATCH v9 06/10] libxl: add libxl support for setting grant table resource limits

2017-09-22 Thread Juergen Gross
Add new domain config items for setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross Acked-by: Ian Jackson --- V6: - made set_gnttab_limits hypercall mandatory, taking defaults from xl.conf V4: - rename configuration it

[Xen-devel] [PATCH v9 09/10] xen: make grant resource limits per domain

2017-09-22 Thread Juergen Gross
Instead of using the same global resource limits of grant tables (max. number of grant frames, max. number of maptrack frames) for all domains make these limits per domain. Set those per-domain limits in grant_table_set_limits(). The global settings are serving as an upper boundary now which must n

[Xen-devel] [PATCH v9 04/10] libxl: add max possible mfn to libxl_physinfo

2017-09-22 Thread Juergen Gross
Add the maximum possible mfn of the host to the libxl_physinfo data structure. Signed-off-by: Juergen Gross Acked-by: Ian Jackson --- tools/libxl/libxl.c | 1 + tools/libxl/libxl.h | 9 + tools/libxl/libxl_types.idl | 1 + 3 files changed, 11 insertions(+) diff --git a/

[Xen-devel] [PATCH v9 01/10] xen: add function for obtaining highest possible memory address

2017-09-22 Thread Juergen Gross
Add a function for obtaining the highest possible physical memory address of the system. This value is influenced by: - hypervisor configuration (CONFIG_BIGMEM) - processor capability (max. addressable physical memory) - memory map at boot time - memory hotplug capability Add this value to xen_sy

[Xen-devel] [PATCH v9 08/10] xen/arm: move arch specific grant table bits into grant_table.c

2017-09-22 Thread Juergen Gross
Instead of attaching the ARM specific grant table data to the domain structure add it to struct grant_table. Add the needed arch functions to the asm-*/grant_table.h includes. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Acked-by: Jan Beulich [non-ARM parts] --- V9: - correct and clea

[Xen-devel] [PATCH v9 10/10] xen: add new Xen cpuid node for max address width info

2017-09-22 Thread Juergen Gross
On very large hosts a pv-guest needs to know whether it will have to handle frame numbers larger than 32 bits in order to select the appropriate grant interface version. Add a new Xen specific CPUID node to contain the maximum machine address width similar to the x86 CPUID node 0x8008 containi

[Xen-devel] [PATCH v9 02/10] libxc: add libxc support for setting grant table resource limits

2017-09-22 Thread Juergen Gross
Add a new libxc function xc_domain_set_gnttbl_limits() setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Acked-by: Wei Liu Acked-by: Ian Jackson --- V4: - use domid_t (Wei Liu) --- tools/lib

Re: [Xen-devel] [PATCH v5 02/23] x86/mm: export get_page_from_mfn

2017-09-22 Thread Jan Beulich
>>> On 14.09.17 at 14:58, wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -705,22 +705,6 @@ bool map_ldt_shadow_page(unsigned int offset) > return true; > } > > - > -static bool get_page_from_mfn(mfn_t mfn, struct domain *d) > -{ > -struct page_info *page = mfn_to_page(

Re: [Xen-devel] [PATCH 1/2] xen: add a global indicator for grant copy being available

2017-09-22 Thread Juergen Gross
On 20/09/17 16:53, Anthony PERARD wrote: > On Tue, Sep 19, 2017 at 01:50:54PM +0200, Juergen Gross wrote: >> The Xen qdisk backend needs to test whether grant copy operations is >> available in the kernel. Unfortunately this collides with using >> xengnttab_set_max_grants() on some kernels as this

[Xen-devel] [qemu-upstream-unstable test] 113699: tolerable FAIL - PUSHED

2017-09-22 Thread osstest service owner
flight 113699 qemu-upstream-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/113699/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 18 guest-start/win.repeat fail in 113668 pass in 113699 test-amd

  1   2   3   >