[Xen-devel] [linux-next test] 110923: tolerable FAIL

2017-06-22 Thread osstest service owner
flight 110923 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/110923/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-xsm 6 xen-bootfail blocked in 110586 test-amd64-amd64-xl-credit2 6

Re: [Xen-devel] [PATCH 2/6] x86/shadow: Fixes to hvm_emulate_insn_fetch()

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > --- a/xen/arch/x86/mm/shadow/common.c > +++ b/xen/arch/x86/mm/shadow/common.c > @@ -235,12 +235,16 @@ hvm_emulate_insn_fetch(enum x86_segment seg, > { > struct sh_emulate_ctxt *sh_ctxt = > container_of(ctxt, struct

Re: [Xen-devel] clean up and modularize arch dma_mapping interface V2

2017-06-22 Thread tndave
On 06/16/2017 11:10 AM, Christoph Hellwig wrote: Hi all, for a while we have a generic implementation of the dma mapping routines that call into per-arch or per-device operations. But right now there still are various bits in the interfaces where don't clearly operate on these ops. This

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 20:13, wrote: > --- a/xen/arch/x86/livepatch.c > +++ b/xen/arch/x86/livepatch.c > @@ -170,14 +170,27 @@ int arch_livepatch_perform_rela(struct livepatch_elf > *elf, > uint8_t *dest = base->load_addr + r->r_offset; > uint64_t val; >

[Xen-devel] [PATCH 12/17 v5] xen/arm: vpl011: Modify xenconsole functions to take console structure as input

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

[Xen-devel] [PATCH 16/17 v5] xen/arm: vpl011: Add a pl011 uart DT node in the guest device tree

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

Re: [Xen-devel] [PATCH] xen/disk: don't leak stack data via response ring

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 20:46, wrote: > On Wed, 21 Jun 2017, Jan Beulich wrote: >> >>> On 20.06.17 at 23:48, wrote: >> > On Tue, 20 Jun 2017, Jan Beulich wrote: >> >> @@ -36,13 +33,7 @@ struct blkif_x86_32_request_discard { >> >> blkif_sector_t

Re: [Xen-devel] [PATCH 1/2] x86/p2m: simplify p2m_next_level()

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:20, wrote: > On 21/06/17 11:25, Jan Beulich wrote: >> Calculate entry PFN and flags just once, making the respective >> variables (and also pg) function wide. Take the opportunity and also >> make the induction variable unsigned. > > Hmm -- I'm a

Re: [Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()

2017-06-22 Thread Andrew Cooper
On 22/06/2017 09:14, Jan Beulich wrote: On 21.06.17 at 17:12, wrote: >> sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() >> infrasturcture, but take the opportunity to avoid opencoding it. >> >> The chosen error constants require need to be

Re: [Xen-devel] [PATCH 5/6] x86/hvm: Break out __hvm_copy()'s translation logic

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -3072,6 +3072,80 @@ void hvm_task_switch( > hvm_unmap_entry(nptss_desc); > } > > +enum hvm_translation_result hvm_translate_get_page( > +struct vcpu *v,

Re: [Xen-devel] [PATCH v3] VT-d PI: track the vcpu number in pi blocking list

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 07:16, wrote: > On Fri, Jun 16, 2017 at 08:34:20AM -0600, Jan Beulich wrote: > On 24.05.17 at 08:56, wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c >>> @@ -82,6 +82,7 @@ static int

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 18:53, wrote: > On 21/06/17 16:54, Jan Beulich wrote: > On 21.06.17 at 17:44, wrote: >>> When you have a long series like this, could you name the files in a way >>> that makes it easier for a shell script to get their

[Xen-devel] [PATCH 10/17 v5] xen/arm: vpl011: Modify xenconsole to define and use a new console structure

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

[Xen-devel] [PATCH 02/17 v5] xen/arm: vpl011: Rename vgic_reg* functions definitions and calls to vreg_reg*

2017-06-22 Thread Bhupinder Thakur
This patch renames the vgic_reg* access functions defined in vreg.h to vreg_reg* and replaces all calls to vgic_reg* functions in vgic/its emulation code to vreg_reg*. vreg_reg* are generic functions, which can be used to operate on 32/64-bit registers. SBSA UART emulation code will also use

[Xen-devel] [PATCH 07/17 v5] xen/arm: vpl011: Rearrange xen header includes in alphabetical order in domctl.c

2017-06-22 Thread Bhupinder Thakur
Rearrange xen header includes in alphabetical order in domctl.c. Signed-off-by: Bhupinder Thakur --- CC: Stefano Stabellini CC: Julien Grall xen/arch/arm/domctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Xen-devel] [PATCH 04/17 v5] xen/arm: vpl011: Add SBSA UART emulation in Xen

2017-06-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 09/17 v5] xen/arm: vpl011: Add a new vuart node in the xenstore

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

[Xen-devel] [PATCH 05/17 v5] xen/arm: vpl011: Allocate a new GFN in the toolstack for vuart

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

[Xen-devel] [PATCH 08/17 v5] xen/arm: vpl011: Add a new domctl API to initialize vpl011

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

[Xen-devel] [PATCH 06/17 v5] xen/arm: vpl011: Add support for vuart in libxl

2017-06-22 Thread Bhupinder Thakur
An option is provided in libxl to enable/disable sbsa vuart while creating a guest domain. Libxl now suppots 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/17 v5] xen/arm: vpl011: Modify xenconsole to support multiple consoles

2017-06-22 Thread Bhupinder Thakur
This patch adds the support for multiple consoles and introduces the iterator functions to operate on multiple consoles. This patch is in preparation to support a new vuart console. Signed-off-by: Bhupinder Thakur --- CC: Ian Jackson CC:

[Xen-devel] [PATCH 11/17 v5] xen/arm: vpl011: Rename the console structure field conspath to xspath

2017-06-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 --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini

[Xen-devel] [PATCH 01/17 v5] xen/arm: vpl011: Move vgic register access functions to vreg.h

2017-06-22 Thread Bhupinder Thakur
These functions are generic in nature and can be reused by other emulation code in Xen. vGICv3 ITS and SBSA UART emulation code, would use these functions to operate on their registers. This patch moves the register access function definitions from vgic.h to vreg.h. Signed-off-by: Bhupinder

[Xen-devel] [PATCH 15/17 v5] xen/arm: vpl011: Add a new vuart console type to xenconsole client

2017-06-22 Thread Bhupinder Thakur
Add a new console type VUART to connect to guest's emualated vuart console. Signed-off-by: Bhupinder Thakur --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall

[Xen-devel] [PATCH 00/17 v5] SBSA UART emulation support in Xen

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

[Xen-devel] [PATCH 17/17 v5] xen/arm: vpl011: Update documentation for vuart console support

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

[Xen-devel] [PATCH 14/17 v5] xen/arm: vpl011: Add support for vuart console in xenconsole

2017-06-22 Thread Bhupinder Thakur
This patch finally adds the support for vuart console. Signed-off-by: Bhupinder Thakur --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes

[Xen-devel] [PATCH 03/17 v5] xen/arm: vpl011: Define common ring buffer helper functions in console.h

2017-06-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/consol.h includes io/ring.h which

Re: [Xen-devel] [PATCH 1/6] x86/hvm: Fixes to hvmemul_insn_fetch()

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > Force insn_off to a single byte, as offset can wrap around or truncate with > respect to sh_ctxt->insn_buf_eip under a number of normal circumstances. > > Furthermore, don't use an ASSERT() for bounds checking the write into >

Re: [Xen-devel] [PATCH 4/6] [RFC] x86/hvm: Rename enum hvm_copy_result to hvm_translation_result

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > > Name definitely open to improvement. I'm fine with it; hvm_translation_result is a little long, but shouldn't be used often.

Re: [Xen-devel] [PATCH v4 07/18] xen/pvcalls: implement socket command

2017-06-22 Thread Roger Pau Monné
On Wed, Jun 21, 2017 at 01:16:56PM -0700, Stefano Stabellini wrote: > On Tue, 20 Jun 2017, Roger Pau Monné wrote: > > On Thu, Jun 15, 2017 at 12:09:36PM -0700, Stefano Stabellini wrote: > > > Just reply with success to the other end for now. Delay the allocation > > > of the actual socket to bind

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 18:36, wrote: > On 21/06/17 16:59, Jan Beulich wrote: > On 21.06.17 at 16:38, wrote: >>> On 21/06/17 11:08, Jan Beulich wrote: So far callers of the libxc interface passed in a domain ID which was then ignored

Re: [Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() > infrasturcture, but take the opportunity to avoid opencoding it. > > The chosen error constants require need to be negative to work with IS_ERR(), > but no

Re: [Xen-devel] xc_evtchn_status fails with EFAULT on HVM, the same on PV works

2017-06-22 Thread Marek Marczykowski-Górecki
[resurrecting old thread...] On Mon, Jan 16, 2017 at 11:41:55PM +, Andrew Cooper wrote: > On 16/01/2017 23:06, Marek Marczykowski-Górecki wrote: > > On Mon, Jan 16, 2017 at 05:17:59AM -0700, Jan Beulich wrote: > >> 2) When the guest issues stac()/clac(), it indicates to Xen _its own_ > >>

Re: [Xen-devel] xc_evtchn_status fails with EFAULT on HVM, the same on PV works

2017-06-22 Thread Andrew Cooper
On 22/06/2017 09:23, Marek Marczykowski-Górecki wrote: > [resurrecting old thread...] > > On Mon, Jan 16, 2017 at 11:41:55PM +, Andrew Cooper wrote: >> On 16/01/2017 23:06, Marek Marczykowski-Górecki wrote: >>> On Mon, Jan 16, 2017 at 05:17:59AM -0700, Jan Beulich wrote: 2) When the guest

Re: [Xen-devel] new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-22 Thread Marek Szyprowski
Hi Christoph, On 2017-06-20 15:16, Christoph Hellwig wrote: On Tue, Jun 20, 2017 at 11:04:00PM +1000, Stephen Rothwell wrote: git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git#dma-mapping-next Contacts: Marek Szyprowski and Kyungmin Park (cc'd) I have called your tree

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-22 Thread George Dunlap
On 22/06/17 07:59, Jan Beulich wrote: >>> , and while I continue to attach >>> files I would have hoped that the mail bodies nowadays come >>> through uncorrupted (and hence I'd expect file names to be >>> chosen by your mail client based on subject, which includes >>> numbering - that's at least

Re: [Xen-devel] [PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0

2017-06-22 Thread Matt Fleming
On Fri, 16 Jun, at 01:53:06PM, Tom Lendacky wrote: > The efi_mem_type() function currently returns a 0, which maps to > EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for > the supplied physical address. Returning EFI_RESERVED_TYPE implies that > a memmap entry exists, when it

[Xen-devel] [PATCH v2 0/2] xen/efi: Fixes

2017-06-22 Thread Daniel Kiper
Hey, Two small fixes (v2, minor cleanup) for Xen dom0 running on x86_64 EFI platforms. I am CC-ing stable maintainers because similar stuff is needed for various stable kernels too. Unfortunately, almost every version needs a bit different set of fixes. So, please treat this email more as head

Re: [Xen-devel] [PATCH v2] VT-d: fix VF of RC integrated endpoint matched to wrong VT-d unit

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 12:47, wrote: > The problem is a VF of RC integrated PF (e.g. PF's BDF is 00:02.0), > we would wrongly use 00:00.0 to search VT-d unit. > > To search VT-d unit for a VF, the BDF of the PF is used. And If the > PF is an Extended Function, the BDF of one

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread George Dunlap
On 22/06/17 08:05, Jan Beulich wrote: On 21.06.17 at 18:36, wrote: >> On 21/06/17 16:59, Jan Beulich wrote: >> On 21.06.17 at 16:38, wrote: On 21/06/17 11:08, Jan Beulich wrote: > So far callers of the libxc interface passed

Re: [Xen-devel] [PATCH] etherboot: use gzip -n

2017-06-22 Thread Ian Jackson
Bernhard M. Wiedemann writes ("[PATCH] etherboot: use gzip -n"): > to not include current timestamp in results > to allow for reproducible builds. Acked-by: Ian Jackson > See https://reproducible-builds.org/ for why this matters We're sold on this BTW, but our build

Re: [Xen-devel] [xen-4.9-testing test] 110903: regressions - FAIL

2017-06-22 Thread Julien Grall
Hi, On 21/06/17 17:26, osstest service owner wrote: flight 110903 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110903/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pygrub 9

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread George Dunlap
On 22/06/17 08:05, Jan Beulich wrote: > No - I'm open to any change to it which makes the currently ignored > argument no longer ignored, without breaking existing (known and > unknown) callers of the libxc wrapper. I.e. I'm in no way opposed to > make it work the way you think it was originally

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread Ian Jackson
George Dunlap writes ("Re: [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics"): > Well, I'm not sure what to say, because in my view the log message > supports my view. :-) Note that there are two errors, both explaining > why the domain cannot be assigned -- one is "no

Re: [Xen-devel] [xen-4.9-testing test] 110903: regressions - FAIL

2017-06-22 Thread Ian Jackson
Julien Grall writes ("Re: [Xen-devel] [xen-4.9-testing test] 110903: regressions - FAIL"): > On 21/06/17 17:26, osstest service owner wrote: > > flight 110903 xen-4.9-testing real [real] > > http://logs.test-lab.xenproject.org/osstest/logs/110903/ > > > > Regressions :-( > > > > Tests which did

Re: [Xen-devel] [PATCH v4 1/9] arm/mem_access: Add (TCR_|TTBCR_)* defines

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: This commit adds (TCR_|TTBCR_)* defines to simplify access to the respective register contents. At the same time, we adjust the macro TCR_T0SZ by using the newly introduced TCR_T0SZ_SHIFT instead of the hardcoded value. Signed-off-by:

Re: [Xen-devel] [PATCH v7 16/36] efi: Add an EFI table address match function

2017-06-22 Thread Matt Fleming
On Fri, 16 Jun, at 01:52:53PM, Tom Lendacky wrote: > Add a function that will determine if a supplied physical address matches > the address of an EFI table. > > Reviewed-by: Borislav Petkov > Signed-off-by: Tom Lendacky > --- > drivers/firmware/efi/efi.c

Re: [Xen-devel] [PATCH v7 18/36] x86/efi: Update EFI pagetable creation to work with SME

2017-06-22 Thread Matt Fleming
On Fri, 16 Jun, at 01:53:17PM, Tom Lendacky wrote: > When SME is active, pagetable entries created for EFI need to have the > encryption mask set as necessary. > > When the new pagetable pages are allocated they are mapped encrypted. So, > update the efi_pgt value that will be used in cr3 to

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 11:58, wrote: > George Dunlap writes ("Re: [PATCH] passthrough: give > XEN_DOMCTL_test_assign_device more sane semantics"): >> I suggest we ask the toolstack maintainers what kind of a function they >> think would be most useful, and then we can

Re: [Xen-devel] [PATCH v7 19/36] x86/mm: Add support to access boot related data in the clear

2017-06-22 Thread Matt Fleming
On Fri, 16 Jun, at 01:53:26PM, Tom Lendacky wrote: > Boot data (such as EFI related data) is not encrypted when the system is > booted because UEFI/BIOS does not run with SME active. In order to access > this data properly it needs to be mapped decrypted. > > Update early_memremap() to provide an

[Xen-devel] [qemu-mainline test] 110925: tolerable FAIL - PUSHED

2017-06-22 Thread osstest service owner
flight 110925 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/110925/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-credit2 16 guest-start.2fail in 110901 pass in 110925 test-armhf-armhf-xl-rtds

[Xen-devel] [ovmf test] 110936: all pass - PUSHED

2017-06-22 Thread osstest service owner
flight 110936 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/110936/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 415fc5e5a4c98f84fd49277872fc49d37aa7e5a1 baseline version: ovmf

Re: [Xen-devel] [PATCH] etherboot: use gzip -n

2017-06-22 Thread Wei Liu
On Thu, Jun 22, 2017 at 11:16:34AM +0200, Bernhard M. Wiedemann wrote: > to not include current timestamp in results > to allow for reproducible builds. > > See https://reproducible-builds.org/ for why this matters > > Signed-off-by: Bernhard M. Wiedemann Acked-by: Wei Liu

[Xen-devel] [xen-unstable-smoke test] 110964: tolerable trouble: broken/pass - PUSHED

2017-06-22 Thread osstest service owner
flight 110964 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/110964/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12

Re: [Xen-devel] [PATCH v7 27/36] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-22 Thread Borislav Petkov
On Fri, Jun 16, 2017 at 01:54:59PM -0500, Tom Lendacky wrote: > The IOMMU is programmed with physical addresses for the various tables > and buffers that are used to communicate between the device and the > driver. When the driver allocates this memory it is encrypted. In order > for the IOMMU to

Re: [Xen-devel] [PATCH v4 5/9] arm/mem_access: Extend BIT-operations to unsigned long long

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: We extend the BIT macro to using values of unsigned long long as to enable setting bits of 64-bit registers on AArch32. In addition, this commit adds a define holding the register width of 64 bit double-word registers. This define

Re: [Xen-devel] [PATCH 6/6] x86/hvm: Implement hvmemul_write() using real mappings

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > --- a/xen/arch/x86/hvm/emulate.c > +++ b/xen/arch/x86/hvm/emulate.c > @@ -498,6 +498,159 @@ static int hvmemul_do_mmio_addr(paddr_t mmio_gpa, > } > > /* > + * Map the frame(s) covering an individual linear access, for writeable > +

Re: [Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 10:21, wrote: > On 22/06/2017 09:14, Jan Beulich wrote: > On 21.06.17 at 17:12, wrote: >>> sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() >>> infrasturcture, but take the opportunity to avoid

[Xen-devel] [PATCH] etherboot: use gzip -n

2017-06-22 Thread Bernhard M. Wiedemann
to not include current timestamp in results to allow for reproducible builds. See https://reproducible-builds.org/ for why this matters Signed-off-by: Bernhard M. Wiedemann --- tools/firmware/etherboot/Makefile | 2 +- tools/firmware/etherboot/README | 2 +- 2 files

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 11:56, wrote: > On 22/06/17 08:05, Jan Beulich wrote: >> No - I'm open to any change to it which makes the currently ignored >> argument no longer ignored, without breaking existing (known and >> unknown) callers of the libxc wrapper. I.e. I'm in no

Re: [Xen-devel] [PATCH v5 2/3] x86/pt: enable binding of GSIs to a PVH Dom0

2017-06-22 Thread Jan Beulich
>>> On 20.06.17 at 11:15, wrote: > @@ -472,7 +514,29 @@ int pt_irq_create_bind( > pirq_dpci->flags = HVM_IRQ_DPCI_MAPPED | > HVM_IRQ_DPCI_MACH_PCI | > HVM_IRQ_DPCI_GUEST_PCI; > -

Re: [Xen-devel] [PATCH v7 26/36] x86/CPU/AMD: Make the microcode level available earlier in the boot

2017-06-22 Thread Borislav Petkov
On Fri, Jun 16, 2017 at 01:54:47PM -0500, Tom Lendacky wrote: > Move the setting of the cpuinfo_x86.microcode field from amd_init() to > early_amd_init() so that it is available earlier in the boot process. This > avoids having to read MSR_AMD64_PATCH_LEVEL directly during early boot. > >

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread George Dunlap
On 22/06/17 10:40, George Dunlap wrote: > On 22/06/17 08:05, Jan Beulich wrote: > On 21.06.17 at 18:36, wrote: >>> On 21/06/17 16:59, Jan Beulich wrote: >>> On 21.06.17 at 16:38, wrote: > On 21/06/17 11:08, Jan Beulich wrote: >>

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Ross Lagerwall
On 06/21/2017 07:13 PM, Andrew Cooper wrote: A symndx of STN_UNDEF is special, and means a symbol value of 0. While legitimate in the ELF standard, its existance in a livepatch is questionable at best. Until a plausible usecase presents itself, reject such a relocation with -EOPNOTSUPP.

Re: [Xen-devel] [PATCH 03/11] make steal_page() return a proper error value

2017-06-22 Thread Julien Grall
Hi, On 21/06/17 10:32, Jan Beulich wrote: ... and use it where suitable (the tmem caller doesn't propagate an error code). While it doesn't matter as much, also make donate_page() follow suit on x86 (on ARM it already returns -ENOSYS). Also move their declarations to common code and add

[Xen-devel] [PATCH v2 1/2] efi: Process MEMATTR table only if EFI_MEMMAP

2017-06-22 Thread Daniel Kiper
Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more generic and covers more cases. Signed-off-by: Daniel Kiper Reviewed-by: Ard Biesheuvel ---

[Xen-devel] [PATCH v2 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-22 Thread Daniel Kiper
Current approach, wholesale efi struct initialization from efi_xen, is not good. Usually if new member is defined then it is properly initialized in drivers/firmware/efi/efi.c but not in arch/x86/xen/efi.c. As I saw it happened a few times until now. So, let's initialize only efi struct members

Re: [Xen-devel] [PATCH v4 2/9] arm/mem_access: Add defines supporting PTs with varying page sizes

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: The ARMv8 architecture supports pages with different (4K, 16K, and 64K) sizes. To enable guest page table walks for various configurations, this commit extends the defines and helpers of the current implementation. Signed-off-by: Sergej

Re: [Xen-devel] [PATCH v4 6/9] arm/mem_access: Add software guest-page-table walk

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: +int guest_walk_tables(const struct vcpu *v, vaddr_t gva, + paddr_t *ipa, unsigned int *perms) +{ +uint32_t sctlr = READ_SYSREG(SCTLR_EL1); +register_t tcr = READ_SYSREG(TCR_EL1); +unsigned int _perms =

Re: [Xen-devel] [PATCH 1/2] x86/p2m: simplify p2m_next_level()

2017-06-22 Thread George Dunlap
On 22/06/17 08:25, Jan Beulich wrote: On 21.06.17 at 17:20, wrote: >> On 21/06/17 11:25, Jan Beulich wrote: >>> Calculate entry PFN and flags just once, making the respective >>> variables (and also pg) function wide. Take the opportunity and also >>> make the

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Thu, Jun 15, 2017 at 01:01:36PM -0600, Tamas K Lengyel wrote: > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: > > diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c > > index d0b0767855..8c39db13e3 100644 > > --- a/xen/arch/x86/mm/mem_access.c >

Re: [Xen-devel] [PATCH v4 6/9] arm/mem_access: Add software guest-page-table walk

2017-06-22 Thread Sergej Proskurin
Hi Julien, On 06/22/2017 01:16 PM, Julien Grall wrote: > Hi Sergej, > > On 20/06/17 21:33, Sergej Proskurin wrote: >> +int guest_walk_tables(const struct vcpu *v, vaddr_t gva, >> + paddr_t *ipa, unsigned int *perms) >> +{ >> +uint32_t sctlr = READ_SYSREG(SCTLR_EL1); >> +

Re: [Xen-devel] [PATCH 2/6] x86/shadow: Fixes to hvm_emulate_insn_fetch()

2017-06-22 Thread Tim Deegan
Hi, At 16:12 +0100 on 21 Jun (1498061548), Andrew Cooper wrote: > Zero-legnth reads are jump-target segmentation checks; never serve them from > the cache. Why not? If the target is in the cached range, then it has passed the segmentation check. (Or if that's not true then the normal fetch

Re: [Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()

2017-06-22 Thread Andrew Cooper
On 22/06/17 13:09, Tim Deegan wrote: > Hi, > > At 16:12 +0100 on 21 Jun (1498061549), Andrew Cooper wrote: >> sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() >> infrasturcture, but take the opportunity to avoid opencoding it. > s/sturct/struct/. D'oh - I'm sure you

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Thu, Jun 22, 2017 at 06:13:22AM -0600, Jan Beulich wrote: > >>> On 22.06.17 at 14:04, wrote: > > On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: > >> >>> On 15.06.17 at 21:01, wrote: > >> > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop

[Xen-devel] [xen-4.6-testing test] 110931: tolerable FAIL - PUSHED

2017-06-22 Thread osstest service owner
flight 110931 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110931/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-xtf-amd64-amd64-3 45 xtf/test-hvm64-lbr-tsx-vmentry fail in 110899 pass in 110931

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread George Dunlap
On 22/06/17 11:58, Jan Beulich wrote: >>> Option 2: Pass the domain to the XSM callback, enabling XSM / Flask >>> policies that can forbid specific devices from being assigned to >>> specific guests. >> >> Is there any possible downside to this ? > > As soon as flask wouldn't ignore it anymore,

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: > >>> On 15.06.17 at 21:01, wrote: > > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: > >> --- a/xen/arch/x86/mm/mem_access.c > >> +++ b/xen/arch/x86/mm/mem_access.c > >> @@ -466,6 +466,58

Re: [Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()

2017-06-22 Thread Tim Deegan
Hi, At 16:12 +0100 on 21 Jun (1498061549), Andrew Cooper wrote: > sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() > infrasturcture, but take the opportunity to avoid opencoding it. s/sturct/struct/. > @@ -4752,8 +4752,8 @@ sh_x86_emulate_write(struct vcpu *v, unsigned

Re: [Xen-devel] [PATCH v4 7/9] arm/mem_access: Add long-descriptor based gpt

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: This commit adds functionality to walk the guest's page tables using the long-descriptor translation table format for both ARMv7 and ARMv8. Similar to the hardware architecture, the implementation supports different page granularities (4K,

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 14:04, wrote: > On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: >> >>> On 15.06.17 at 21:01, wrote: >> > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: >> >> --- a/xen/arch/x86/mm/mem_access.c

[Xen-devel] [PATCH] mini-os: use gzip -n

2017-06-22 Thread Bernhard M. Wiedemann
to not add current timestamp to ioemu-stubdom.gz pv-grub-x86_32.gz pv-grub-x86_64.gz xenstore-stubdom.gz to allow for reproducible builds Signed-off-by: Bernhard M. Wiedemann --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile

Re: [Xen-devel] [PATCH v4 8/9] arm/mem_access: Add short-descriptor based gpt

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: This commit adds functionality to walk the guest's page tables using the short-descriptor translation table format for both ARMv7 and ARMv8. The implementation is based on ARM DDI 0487B-a J1-6002 and ARM DDI 0406C-b B3-1506. Signed-off-by:

[Xen-devel] live migration of HVM domUs with more than 32vcpus fails

2017-06-22 Thread Olaf Hering
It seems that live migration of HVM domUs with more than 32 vcpus causes a hang of the domU on the remote side. Both ping and 'xl console' show no reaction. This happens also with kernel-4.12. Is this a known bug? Olaf signature.asc Description: PGP signature

Re: [Xen-devel] live migration of HVM domUs with more than 32vcpus fails

2017-06-22 Thread Boris Ostrovsky
On 06/22/2017 10:39 AM, Olaf Hering wrote: > On Thu, Jun 22, Konrad Rzeszutek Wilk wrote: > >> On Thu, Jun 22, 2017 at 03:57:52PM +0200, Olaf Hering wrote: >>> It seems that live migration of HVM domUs with more than 32 vcpus causes >>> a hang of the domU on the remote side. Both ping and 'xl

Re: [Xen-devel] [PATCH] mini-os: use gzip -n

2017-06-22 Thread Andrew Cooper
On 22/06/17 15:09, Wei Liu wrote: > Cc minios-devel and Samuel > > On Thu, Jun 22, 2017 at 03:40:26PM +0200, Bernhard M. Wiedemann wrote: >> to not add current timestamp to >> ioemu-stubdom.gz >> pv-grub-x86_32.gz >> pv-grub-x86_64.gz >> xenstore-stubdom.gz >> >> to allow for reproducible builds

Re: [Xen-devel] [PATCH net] xen-netback: correctly schedule rate-limited queues

2017-06-22 Thread David Miller
From: Wei Liu Date: Wed, 21 Jun 2017 10:21:22 +0100 > Add a flag to indicate if a queue is rate-limited. Test the flag in > NAPI poll handler and avoid rescheduling the queue if true, otherwise > we risk locking up the host. The rescheduling will be done in the > timer

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi Wei, Thank you for your valuable comments. 2017-06-21 23:09 GMT+08:00 Wei Liu : > On Wed, Jun 21, 2017 at 01:18:38AM +0800, Zhongze Liu wrote: >> >> 1. Motivation and Description >>

[Xen-devel] [xen-4.9-testing test] 110942: regressions - FAIL

2017-06-22 Thread osstest service owner
flight 110942 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110942/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 15 guest-start/debian.repeat fail REGR. vs. 110542

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 11:27:50AM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 21, 2017 at 09:26:15PM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jun 21, 2017 at 07:13:36PM +0100, Andrew Cooper wrote: > > > A symndx of STN_UNDEF is special, and means a symbol value of 0. While > > >

Re: [Xen-devel] [PATCH 1/2] arm: smccc: handle SMCs/HVCs according to SMCCC

2017-06-22 Thread Volodymyr Babchuk
Hi Julien, On 15.06.17 13:48, Julien Grall wrote: Hi Volodymyr, On 14/06/17 15:10, Volodymyr Babchuk wrote: SMCCC (SMC Call Convention) describes how to handle both HVCs and SMCs. SMCCC states that both HVC and SMC are valid conduits to call to a different firmware functions. Thus, for

[Xen-devel] [PATCH v3] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-22 Thread Zhongze Liu
This is a preparation for the proposal "allow setting up shared memory areas between VMs from xl config file". See: V2: https://lists.xen.org/archives/html/xen-devel/2017-06/msg02256.html V1: https://lists.xen.org/archives/html/xen-devel/2017-05/msg01288.html The plan is to use

[Xen-devel] [PATCH v5 4/8] mm: Scrub memory from idle loop

2017-06-22 Thread Boris Ostrovsky
Instead of scrubbing pages during guest destruction (from free_heap_pages()) do this opportunistically, from the idle loop. We might come to scrub_free_pages()from idle loop while another CPU uses mapcache override, resulting in a fault while trying to do __map_domain_page() in scrub_one_page().

[Xen-devel] [PATCH v5 5/8] spinlock: Introduce spin_lock_cb()

2017-06-22 Thread Boris Ostrovsky
While waiting for a lock we may want to periodically run some code. This code may, for example, allow the caller to release resources held by it that are no longer needed in the critical section protected by the lock. Specifically, this feature will be needed by scrubbing code where the scrubber,

[Xen-devel] [PATCH v5 6/8] mm: Keep heap accessible to others while scrubbing

2017-06-22 Thread Boris Ostrovsky
Instead of scrubbing pages while holding heap lock we can mark buddy's head as being scrubbed and drop the lock temporarily. If someone (most likely alloc_heap_pages()) tries to access this chunk it will signal the scrubber to abort scrub by setting head's BUDDY_SCRUB_ABORT bit. The scrubber

[Xen-devel] [PATCH v5 0/8] Memory scrubbing from idle loop

2017-06-22 Thread Boris Ostrovsky
Changes in v5: * Make page_info.u.free and union and use bitfields there. * Bug fixes (see per-patch notes) When a domain is destroyed the hypervisor must scrub domain's pages before giving them to another guest in order to prevent leaking the deceased guest's data. Currently this is done during

[Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-06-22 Thread Boris Ostrovsky
When allocating pages in alloc_heap_pages() first look for clean pages. If none is found then retry, take pages marked as unscrubbed and scrub them. Note that we shouldn't find unscrubbed pages in alloc_heap_pages() yet. However, this will become possible when we stop scrubbing from

[Xen-devel] [PATCH v5 7/8] mm: Print number of unscrubbed pages in 'H' debug handler

2017-06-22 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky Reviewed-by: Wei Liu --- xen/common/page_alloc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index f0e5399..da5ffc2 100644 ---

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi, After talking to Stefano, I know that there seem to be no such hypercalls to restrict the W/R/X permissions on the shared backing pages (XENMEM_access_op is for another purpose, sorry for getting its usage wrong). And it seems that the ability to specify these permissions is not strictly

  1   2   >