[Xen-devel] [qemu-upstream-4.6-testing baseline-only test] 68124: tolerable FAIL

2016-11-30 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 68124 qemu-upstream-4.6-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/68124/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 16 gues

Re: [Xen-devel] [PATCH v2 06/19] x86/pv: Implement pv_inject_{event, page_fault, hw_exception}()

2016-11-30 Thread Jan Beulich
>>> On 29.11.16 at 17:50, wrote: > On 29/11/16 16:00, Jan Beulich wrote: > On 28.11.16 at 12:13, wrote: >>> The existing propagate_page_fault() is fairly similar to >>> pv_inject_page_fault(), although it has a return value. Only a single >>> caller >>> makes use of the return value, and no

Re: [Xen-devel] [PATCH v14] This is the ABI for the two halves of a para-virtualized sound driver to communicate with each to other.

2016-11-30 Thread Jan Beulich
>>> On 29.11.16 at 19:44, wrote: > On 11/29/2016 08:30 PM, Dario Faggioli wrote: >> On Tue, 2016-11-29 at 19:27 +0200, Oleksandr Andrushchenko wrote: >>> On 11/29/2016 07:05 PM, Jan Beulich wrote: If you document it as padding, you can't easily use it later on for some extension. >>> Why

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Jan Beulich
>>> On 29.11.16 at 21:19, wrote: > On 29/11/16 12:09, Roger Pau Monne wrote: >> On Tue, Nov 29, 2016 at 04:44:18AM -0700, Jan Beulich wrote: >> On 29.11.16 at 12:38, wrote: On Tue, Nov 29, 2016 at 03:40:37AM -0700, Jan Beulich wrote: On 29.11.16 at 03:59, wrote: >> Either w

Re: [Xen-devel] [PATCH v3.1 07/15] xen/x86: do the PCI scan unconditionally

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 06:53, wrote: > I'm OK with this policy change. Although there is no strict dependency > between VT-d and PCI scan, the purpose of VT-d is for PCI-based > device assignment. How is there not, considering the bus to bridge mapping? Within IOMMU code, VT-d is the only user of fi

Re: [Xen-devel] [PATCH v14] This is the ABI for the two halves of a para-virtualized sound driver to communicate with each to other.

2016-11-30 Thread Oleksandr Andrushchenko
On 11/30/2016 10:45 AM, Jan Beulich wrote: On 29.11.16 at 19:44, wrote: On 11/29/2016 08:30 PM, Dario Faggioli wrote: On Tue, 2016-11-29 at 19:27 +0200, Oleksandr Andrushchenko wrote: On 11/29/2016 07:05 PM, Jan Beulich wrote: If you document it as padding, you can't easily use it later on f

Re: [Xen-devel] [PATCH v3 04/15] x86: refactor psr: Encapsulate 'cbm_len' and 'cbm_max'

2016-11-30 Thread Yi Sun
On 16-11-29 02:43:24, Jan Beulich wrote: > >>> On 29.11.16 at 05:38, wrote: > > To make codes be better reviewable, I propose below three suggestions: > > 1) I write a design document about refactor to make you more easily > > understand the ideas. > > This is appreciated, but I don't think it's

Re: [Xen-devel] [PATCH RFC 1/2] xen/page_alloc: Add size_align parameter to provide MFNs which are size aligned.

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 05:39, wrote: > This is to support the requirement that exists in PV dom0 > when doing DMA requests: > > "dma_alloc_coherent() > [...] > The CPU virtual address and the DMA address are both guaranteed to be > aligned to the smallest PAGE_SIZE order which is greater than or equa

Re: [Xen-devel] xen-4.8-rc7 in Stretch with linux-image 4.8 fails to boot domU with pv-grub

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 01:29, wrote: > Built & packaged xen 4.8-rc7 in Stretch (deb9) today. > xen-4.8-rc7 in Stretch with linux-image 4.8, fails to boot domU kernel with > pv-grub: https://paste.debian.net/plain/899726 > from config/Tools.mk: ZLIB := -DHAVE_BZLIB -lbz2 -DHAVE_LZMA -llzma >

Re: [Xen-devel] [PATCH v3 04/15] x86: refactor psr: Encapsulate 'cbm_len' and 'cbm_max'

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 10:08, wrote: > On 16-11-29 02:43:24, Jan Beulich wrote: >> >>> On 29.11.16 at 05:38, wrote: >> > To make codes be better reviewable, I propose below three suggestions: >> > 1) I write a design document about refactor to make you more easily >> > understand the ideas. >> >> T

[Xen-devel] [PATCH 1/3] Don't create default ioreq server

2016-11-30 Thread Zhang Chen
The ioreq server make colo run failed. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- xen/arch/x86/hvm/hvm.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 25dc759..8522852 100644 --- a/xen/arch/x86/hvm/hvm.c +++

[Xen-devel] [PATCH 3/3] Add COLO replication top-id support

2016-11-30 Thread Zhang Chen
Because of qemu colo add the top-id, so we update it. Signed-off-by: Zhang Chen --- tools/libxl/libxl_dm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index ad366a8..815938e 100644 --- a/tools/libxl/libxl_dm.c +++ b/

[Xen-devel] [PATCH 0/3] Support the latest version of qemu COLO

2016-11-30 Thread Zhang Chen
Because of new version COLO has been merged by QEMU, Some codes has changed by community comments. So, we must update Xen COLO codes to support latest qemu. Zhang Chen (3): Don't create default ioreq server Add Xen colo support for qemu-upstream colo codes Add COLO replication top-id support

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Julien Grall
Hi Stefano, On 29/11/2016 19:08, Stefano Stabellini wrote: On Mon, 28 Nov 2016, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise, system gets panic when dom0 accesses its MMIO registers. The current XEN doesn

[Xen-devel] [PATCH 2/3] Add Xen colo support for qemu-upstream colo codes

2016-11-30 Thread Zhang Chen
Because of qemu codes update, we update Xen colo block codes Signed-off-by: Zhang Chen --- tools/libxl/libxl_colo_qdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_colo_qdisk.c b/tools/libxl/libxl_colo_qdisk.c index d271d1f..300bff2 100644 --- a/to

[Xen-devel] [xen-unstable-coverity test] 102731: all pass - PUSHED

2016-11-30 Thread osstest service owner
flight 102731 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/102731/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen a7a578ce6b8634eec30cb8445ea98e18d9b4e9b8 baseline version: xen 1c52

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Roger Pau Monne
On Wed, Nov 30, 2016 at 01:54:00AM -0700, Jan Beulich wrote: > >>> On 29.11.16 at 21:19, wrote: > > On 29/11/16 12:09, Roger Pau Monne wrote: > >> On Tue, Nov 29, 2016 at 04:44:18AM -0700, Jan Beulich wrote: > >> On 29.11.16 at 12:38, wrote: > On Tue, Nov 29, 2016 at 03:40:37AM -0700, Ja

Re: [Xen-devel] [PATCH v3 04/15] x86: refactor psr: Encapsulate 'cbm_len' and 'cbm_max'

2016-11-30 Thread Yi Sun
On 16-11-30 02:42:20, Jan Beulich wrote: > >>> On 30.11.16 at 10:08, wrote: > > On 16-11-29 02:43:24, Jan Beulich wrote: > >> >>> On 29.11.16 at 05:38, wrote: > >> > To make codes be better reviewable, I propose below three suggestions: > >> > 1) I write a design document about refactor to make y

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Julien Grall
Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise, system gets panic when dom0 accesses its MMIO registers. The current XEN doesn't support virtualization of watchdog timer, so

Re: [Xen-devel] [DOC v1] Xen transport for 9pfs

2016-11-30 Thread David Vrabel
On 29/11/16 23:34, Stefano Stabellini wrote: > > The producer (the backend for **in**, the frontend for **out**) writes to the > array in the following way: > - read memory barrier > - read *cons*, *prod* from shared memory > - write to array at position *prod* up to *cons*, wrapping around the c

Re: [Xen-devel] [COVERITY ACCESS] for Embedded/Automotive team

2016-11-30 Thread Artem Mygaiev
Hi Lars On 29.11.16 17:04, Lars Kurth wrote: > Please don't post them to xen-devel@ though: as a one-off, you may want to > send to Julien and maybe Stefano > Longer term, we ought to find a way to send the output to a safe place, as > for x86 > Lars I have added Julien, Stefano and you as membe

Re: [Xen-devel] [COVERITY ACCESS] for Embedded/Automotive team

2016-11-30 Thread Artem Mygaiev
Done On 29.11.16 20:19, Stefano Stabellini wrote: > On Tue, 29 Nov 2016, Artem Mygaiev wrote: >> Hi Julien >> >> On 29.11.16 16:27, Julien Grall wrote: >>> Hi Artem, >>> >>> On 29/11/16 14:21, Artem Mygaiev wrote: Lars, the project is approved by Coverity. Scan has found some issues in

Re: [Xen-devel] xen-4.8-rc7 in Stretch with linux-image 4.8 fails to boot domU with pv-grub

2016-11-30 Thread Juergen Gross
On 30/11/16 10:41, Jan Beulich wrote: On 30.11.16 at 01:29, wrote: >> Built & packaged xen 4.8-rc7 in Stretch (deb9) today. >> xen-4.8-rc7 in Stretch with linux-image 4.8, fails to boot domU kernel with >> pv-grub: https://paste.debian.net/plain/899726 >> from config/Tools.mk: ZLIB :=

[Xen-devel] [PATCH v10 04/13] x86: properly calculate xen ELF end of image address

2016-11-30 Thread Daniel Kiper
This patch is prereq for "efi: build xen.gz with EFI code" patch which adds, among others, xen/arch/x86/efi/relocs-dummy.S to xen.gz output. Below there is a description why it is needed. Currently xen ELF end of image address is calculated using first line from "nm -nr xen/xen-syms" output. Howev

[Xen-devel] [PATCH v10 02/13] efi: create efi_enabled()

2016-11-30 Thread Daniel Kiper
First of all we need to differentiate between legacy BIOS and EFI platforms during runtime, not during build, because one image will have legacy and EFI code and can be executed on both platforms. Additionally, we need more fine grained knowledge about EFI environment and check for EFI platform and

[Xen-devel] [PATCH v10 00/13] x86: multiboot2 protocol support

2016-11-30 Thread Daniel Kiper
Hi, I am sending tenth version of multiboot2 protocol support for legacy BIOS and EFI platforms. This patch series release contains fixes for all known issues. The final goal is xen.efi binary file which could be loaded by EFI loader, multiboot (v1) protocol (only on legacy BIOS platforms) and mu

[Xen-devel] [PATCH v10 01/13] x86: add multiboot2 protocol support

2016-11-30 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper Reviewed-by: Jan Beulich --- v9 - suggestions/fixes: - use

[Xen-devel] [PATCH v10 05/13] efi: build xen.gz with EFI code

2016-11-30 Thread Daniel Kiper
Build xen.gz with EFI code. We need this to support multiboot2 protocol on EFI platforms. If we wish to load non-ELF file using multiboot (v1) or multiboot2 then it must contain "linear" (or "flat") representation of code and data. This is requirement of both boot protocols. Currently, PE file con

[Xen-devel] [PATCH v10 06/13] efi: create new early memory allocator

2016-11-30 Thread Daniel Kiper
There is a problem with place_string() which is used as early memory allocator. It gets memory chunks starting from start symbol and goes down. Sadly this does not work when Xen is loaded using multiboot2 protocol because then the start lives on 1 MiB address and we should not allocate a memory fro

[Xen-devel] [PATCH v10 10/13] x86/setup: use XEN_IMG_OFFSET instead of...

2016-11-30 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- xen/arch/x86/setup.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index fa808ef..5d0830e 100644 --- a/xen/arch/x86/setup.c +++ b

[Xen-devel] [PATCH v10 13/13] x86: add multiboot2 protocol support for relocatable images

2016-11-30 Thread Daniel Kiper
Add multiboot2 protocol support for relocatable images. Only GRUB2 with "multiboot2: Add support for relocatable images" patch understands that feature. Older multiboot protocol (regardless of version) compatible loaders ignore it and everything works as usual. Signed-off-by: Daniel Kiper Acked-b

[Xen-devel] [PATCH v10 03/13] x86: allow EFI reboot method neither on EFI platforms...

2016-11-30 Thread Daniel Kiper
..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- v6 - suggestions/fixes: - move this commit behind "efi: create efi_enabled()" commit (suggested by Jan Beulich). v5 - suggestions/fixes: - fix build err

[Xen-devel] [PATCH v10 11/13] x86: make Xen early boot code relocatable

2016-11-30 Thread Daniel Kiper
Every multiboot protocol (regardless of version) compatible image must specify its load address (in ELF or multiboot header). Multiboot protocol compatible loader have to load image at specified address. However, there is no guarantee that the requested memory region (in case of Xen it starts at 2

[Xen-devel] [PATCH v10 08/13] x86/boot: implement early command line parser in C

2016-11-30 Thread Daniel Kiper
Current early command line parser implementation in assembler is very difficult to change to relocatable stuff using segment registers. This requires a lot of changes in very weird and fragile code. So, reimplement this functionality in C. This way code will be relocatable out of the box (without p

[Xen-devel] [PATCH v10 07/13] x86: add multiboot2 protocol support for EFI platforms

2016-11-30 Thread Daniel Kiper
This way Xen can be loaded on EFI platforms using GRUB2 and other boot loaders which support multiboot2 protocol. Signed-off-by: Daniel Kiper --- v10 - suggestions/fixes: - replace ljmpl with lretq (suggested by Andrew Cooper), - introduce efi_platform to increase code readability

[Xen-devel] [PATCH v10 09/13] x86: change default load address from 1 MiB to 2 MiB

2016-11-30 Thread Daniel Kiper
Subsequent patches introducing relocatable early boot code play with page tables using 2 MiB huge pages. If load address is not aligned at 2 MiB then code touching such page tables must have special cases for start and end of Xen image memory region. So, let's make life easier and move default load

[Xen-devel] [PATCH v10 12/13] x86/boot: rename sym_phys() to sym_offs()

2016-11-30 Thread Daniel Kiper
This way macro name better describes its function. Currently it is used to calculate symbol offset in relation to the beginning of Xen image mapping. However, value returned by sym_offs() for a given symbol is not always equal its physical address. There is no functional change. Suggested-by: Jan

Re: [Xen-devel] [PATCH 1/3] Don't create default ioreq server

2016-11-30 Thread Andrew Cooper
On 30/11/16 09:47, Zhang Chen wrote: > The ioreq server make colo run failed. > > Signed-off-by: Zhang Chen > Signed-off-by: Wen Congyang Nack. You can simply "fix" a COLO issue by breaking a much more common usecase. What actually breaks in the COLO case here? ~Andrew > --- > xen/arch/x86

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

2016-11-30 Thread osstest service owner
flight 102720 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/102720/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-multivcpu 9 debian-install fail REGR. vs. 102704 Regressions which

Re: [Xen-devel] [PATCH v2] xen/arm: Add support for 16 bit VMIDs

2016-11-30 Thread Bhupinder Thakur
Hi Julien, >> >> VMID space is increased to 16-bits from 8-bits in ARMv8 8.1 revision. >> This allows more than 256 VMs to be supported by Xen. >> >> This change adds support for 16-bit VMIDs in Xen based on whether the >> architecture supports it. >> >> Signed-off-by: Bhupinder Thakur >> Reviewe

Re: [Xen-devel] [PATCH v3.1 15/15] xen/x86: setup PVHv2 Dom0 ACPI tables

2016-11-30 Thread Roger Pau Monne
On Mon, Nov 14, 2016 at 09:15:37AM -0700, Jan Beulich wrote: > >>> On 29.10.16 at 11:00, wrote: > > Also, regions marked as E820_ACPI or E820_NVS are identity mapped into Dom0 > > p2m, plus any top-level ACPI tables that should be accessible to Dom0 and > > that don't reside in RAM regions. This i

Re: [Xen-devel] [PATCH v9 07/13] x86: add multiboot2 protocol support for EFI platforms

2016-11-30 Thread Daniel Kiper
On Fri, Nov 25, 2016 at 12:50:55AM -0700, Jan Beulich wrote: > >>> On 24.11.16 at 22:44, wrote: > > On Thu, Nov 24, 2016 at 04:08:12AM -0700, Jan Beulich wrote: > >> >>> On 23.11.16 at 19:52, wrote: > >> > On 29/09/16 22:42, Daniel Kiper wrote: > > > > [...] > > > >> >> +.Lefi_mb2_tsize: > >> >>

[Xen-devel] [PATCH v3 01/24] x86/shadow: Fix #PFs from emulated writes crossing a page boundary

2016-11-30 Thread Andrew Cooper
When translating the second frame of a write crossing a page boundary, mask the linear address down to the page boundary. This causes the correct %cr2 being reported to the guest in the case that the second frame suffers a pagefault during translation. Signed-off-by: Andrew Cooper Acked-by: Tim

[Xen-devel] [PATCH v3 03/24] x86/emul: Simplfy emulation state setup

2016-11-30 Thread Andrew Cooper
The current code to set up emulation state is ad-hoc and error prone. * Consistently zero all emulation state structures. * Avoid explicitly initialising some state to 0. * Explicitly identify all input and output state in x86_emulate_ctxt. This involves rearanging some fields. * Have x86_

[Xen-devel] [PATCH v3 08/24] x86/emul: Correct the behaviour of pop %ss and interrupt shadowing

2016-11-30 Thread Andrew Cooper
The mov_ss retire flag should only be set once load_seg() has returned success. In particular, it should not be set if an exception occured when trying to load %ss. _hvm_emulate_one(), currently the sole user of mov_ss, only consideres it in the case that x86_emulate() returns X86EMUL_OKAY, so th

[Xen-devel] [PATCH v3 04/24] x86/emul: Rename hvm_trap to x86_event and move it into the emulation infrastructure

2016-11-30 Thread Andrew Cooper
The x86 emulator needs to gain an understanding of interrupts and exceptions generated by its actions. The naming choice is to match both the Intel and AMD terms, and to avoid 'trap' specifically as it has an architectural meaning different to its current usage. While making this change, make oth

[Xen-devel] [PATCH v3 05/24] x86/emul: Rename HVM_DELIVER_NO_ERROR_CODE to X86_EVENT_NO_EC

2016-11-30 Thread Andrew Cooper
and move it to live with the other x86_event infrastructure in x86_emulate.h. Switch it and x86_event.error_code to being signed, matching the rest of the code. Signed-off-by: Andrew Cooper Reviewed-by: Paul Durrant Reviewed-by: Boris Ostrovsky Reviewed-by: Kevin Tian Reviewed-by: Jan Beulich

[Xen-devel] [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union

2016-11-30 Thread Andrew Cooper
Rename byte to raw, as the field being a single byte long is an implementation detail. Make the bitfields part of an anonymous struct to remove the .flags qualifier. Change the types of the flags to being booleans, to match their use. No functional change. Signed-off-by: Andrew Cooper --- CC:

[Xen-devel] [PATCH v3 09/24] x86/emul: Provide a wrapper to x86_emulate() to ASSERT() certain behaviour

2016-11-30 Thread Andrew Cooper
In debug builds, confirm that some properties of x86_emulate()'s behaviour actually hold. The first property, fixed in a previous change, is that retire flags are only ever set in the X86EMUL_OKAY case. While adjusting the userspace test harness to cope with ASSERT() in x86_emulate.h, fix a build

[Xen-devel] [PATCH v3 06/24] x86/pv: Implement pv_inject_{event, page_fault, hw_exception}()

2016-11-30 Thread Andrew Cooper
To help with event injection improvements for the PV uses of x86_emulate(), implement a event injection API which matches its hvm counterpart. This is started with taking do_guest_trap() and modifying its calling API to pv_inject_event(), subsequentally implementing the former in terms of the latt

Re: [Xen-devel] [PATCH v10 09/13] x86: change default load address from 1 MiB to 2 MiB

2016-11-30 Thread Juergen Gross
On 30/11/16 14:04, Daniel Kiper wrote: > Subsequent patches introducing relocatable early boot code play with > page tables using 2 MiB huge pages. If load address is not aligned at > 2 MiB then code touching such page tables must have special cases for > start and end of Xen image memory region. S

[Xen-devel] [PATCH for-4.9 v3 00/24] XSA-191 followup

2016-11-30 Thread Andrew Cooper
This is the quantity of changes required to fix some edgecases in XSA-191 which were ultimately chosen not to go out in the security fix. The main purpose of this series is to fix emulation sufficiently to allow the final patch to avoid opencoding all of the segmenation logic. Changes from v2:

[Xen-devel] [PATCH v3 02/24] x86/emul: Drop X86EMUL_CMPXCHG_FAILED

2016-11-30 Thread Andrew Cooper
X86EMUL_CMPXCHG_FAILED was introduced in c/s d430aae25 in 2005. Even at the time it alised what is now X86EMUL_RETRY (as well as what is now X86EMUL_EXCEPTION). I am not sure why the distinction was considered useful at the time. It is only used twice; there is no need to call it out differently

[Xen-devel] [PATCH] xen/arm: Fix misplaced parentheses for PSCI version check

2016-11-30 Thread Artem Mygaiev
Fix misplaced parentheses for PSCI version check Signed-off-by: Artem Mygaiev --- xen/arch/arm/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c index 7966b5e..34ee97e 100644 --- a/xen/arch/arm/psci.c +++ b/xen/arch/arm/psci.c @@

Re: [Xen-devel] [PATCH v9 07/13] x86: add multiboot2 protocol support for EFI platforms

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 14:45, wrote: > On Fri, Nov 25, 2016 at 12:50:55AM -0700, Jan Beulich wrote: >> >>> On 24.11.16 at 22:44, wrote: >> > On Thu, Nov 24, 2016 at 04:08:12AM -0700, Jan Beulich wrote: >> >> >>> On 23.11.16 at 19:52, wrote: >> >> > Always use add/sub 1 in preference to inc and dec.

Re: [Xen-devel] [PATCH v10 09/13] x86: change default load address from 1 MiB to 2 MiB

2016-11-30 Thread Juergen Gross
On 30/11/16 14:51, Juergen Gross wrote: > On 30/11/16 14:04, Daniel Kiper wrote: >> Subsequent patches introducing relocatable early boot code play with >> page tables using 2 MiB huge pages. If load address is not aligned at >> 2 MiB then code touching such page tables must have special cases for

Re: [Xen-devel] [PATCH v3.1 15/15] xen/x86: setup PVHv2 Dom0 ACPI tables

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 13:40, wrote: > On Mon, Nov 14, 2016 at 09:15:37AM -0700, Jan Beulich wrote: >> >>> On 29.10.16 at 11:00, wrote: >> > Also, regions marked as E820_ACPI or E820_NVS are identity mapped into Dom0 >> > p2m, plus any top-level ACPI tables that should be accessible to Dom0 and >> >

[Xen-devel] [PATCH v3 24/24] x86/emul: Use system-segment relative memory accesses

2016-11-30 Thread Andrew Cooper
With hvm_virtual_to_linear_addr() capable of doing proper system-segment relative memory accesses, avoid open-coding the address and limit calculations locally. When a table spans the 4GB boundary (32bit) or non-canonical boundary (64bit), segmentation errors are now raised. Previously, the use o

[Xen-devel] [PATCH v3 12/24] x86/emul: Remove opencoded exception generation

2016-11-30 Thread Andrew Cooper
Introduce generate_exception() for unconditional exception generation, and replace existing uses. Both generate_exception() and generate_exception_if() are updated to make their error code parameters optional, which removes the use of the -1 sentinal. The ioport_access_check() check loses the pre

[Xen-devel] [PATCH v3 23/24] x86/emul: Prepare to allow use of system segments for memory references

2016-11-30 Thread Andrew Cooper
All system segments (GDT/IDT/LDT and TR) describe a linear address and limit, and act similarly to user segments. However all current uses of these tables in the emulator opencode the address calculations and limit checks. In particular, no care is taken for access which wrap around the 4GB or no

[Xen-devel] [PATCH v3 17/24] x86/pv: Avoid raising faults behind the emulators back

2016-11-30 Thread Andrew Cooper
Use x86_emul_pagefault() rather than pv_inject_page_fault() to cause raised pagefaults to be known to the emulator. This requires altering the callers of x86_emulate() to properly re-inject the event. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan v3: * Split out #DB handlin

[Xen-devel] [PATCH v3 11/24] x86/emul: Implement singlestep as a retire flag

2016-11-30 Thread Andrew Cooper
The behaviour of singlestep is to raise #DB after the instruction has been completed, but implementing it with inject_hw_exception() causes x86_emulate() to return X86EMUL_EXCEPTION, despite succesfully completing execution of the instruction, including register writeback. Instead, use a retire fl

[Xen-devel] [PATCH v3 18/24] x86/shadow: Avoid raising faults behind the emulators back

2016-11-30 Thread Andrew Cooper
Use x86_emul_{hw_exception,pagefault}() rather than {pv,hvm}_inject_page_fault() and hvm_inject_hw_exception() to cause raised faults to be known to the emulator. This requires altering the callers of x86_emulate() to properly re-inject the event. While fixing this, fix the singlestep behaviour.

[Xen-devel] [PATCH v3 22/24] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-30 Thread Andrew Cooper
Drop the call to hvm_inject_page_fault() in __hvm_copy(), and require callers to inject the pagefault themselves. Signed-off-by: Andrew Cooper Acked-by: Tim Deegan Acked-by: Kevin Tian Reviewed-by: Jan Beulich --- CC: Paul Durrant v3: * Correct patch description * Fix rebasing error over p

[Xen-devel] [PATCH v3 13/24] x86/emul: Rework emulator event injection

2016-11-30 Thread Andrew Cooper
The emulator needs to gain an understanding of interrupts and exceptions generated by its actions. Move hvm_emulate_ctxt.{exn_pending,trap} into struct x86_emulate_ctxt so they are visible to the emulator. This removes the need for the inject_{hw_exception,sw_interrupt}() hooks, which are dropped

[Xen-devel] [PATCH v3 21/24] x86/hvm: Rename hvm_copy_*_guest_virt() to hvm_copy_*_guest_linear()

2016-11-30 Thread Andrew Cooper
The functions use linear addresses, not virtual addresses, as no segmentation is used. (Lots of other code in Xen makes this mistake.) Signed-off-by: Andrew Cooper Acked-by: Tim Deegan Reviewed-by: Kevin Tian Reviewed-by: Jan Beulich Reviewed-by: Paul Durrant --- xen/arch/x86/hvm/emulate.c

[Xen-devel] [PATCH v3 15/24] x86/hvm: Reposition the modification of raw segment data from the VMCB/VMCS

2016-11-30 Thread Andrew Cooper
Intel VT-x and AMD SVM provide access to the full segment descriptor cache via fields in the VMCB/VMCS. However, the bits which are actually checked by hardware and preserved across vmentry/exit are inconsistent, and the vendor accessor functions perform inconsistent modification to the raw values

[Xen-devel] [PATCH v3 10/24] x86/emul: Always use fault semantics for software events

2016-11-30 Thread Andrew Cooper
The common case is already using fault semantics out of x86_emulate(), as that is how VT-x/SVM expects to inject the event (given suitable hardware support). However, x86_emulate() returning X86EMUL_EXCEPTION and also completing a register writeback is problematic for callers. Switch the logic to

[Xen-devel] [PATCH v3 20/24] x86/hvm: Reimplement hvm_copy_*_nofault() in terms of no pagefault_info

2016-11-30 Thread Andrew Cooper
No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Tim Deegan Reviewed-by: Paul Durrant --- xen/arch/x86/hvm/emulate.c| 6 ++--- xen/arch/x86/hvm/hvm.c| 56 +-- xen/arch/x86/mm/shadow/common.c | 8 +

[Xen-devel] [PATCH v3 19/24] x86/hvm: Extend the hvm_copy_*() API with a pagefault_info pointer

2016-11-30 Thread Andrew Cooper
which is filled with pagefault information should one occur. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Tim Deegan Reviewed-by: Paul Durrant Reviewed-by: Kevin Tian --- xen/arch/x86/hvm/emulate.c| 8 --- xen/arch/x86/hvm/hvm.c

[Xen-devel] [PATCH v3 14/24] x86/vmx: Use hvm_{get, set}_segment_register() rather than vmx_{get, set}_segment_register()

2016-11-30 Thread Andrew Cooper
No functional change at this point, but this is a prerequisite for forthcoming functional changes. Make vmx_get_segment_register() private to vmx.c like all the other Vendor get/set functions. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: George Dunlap Acked-by: Kevin Tian

[Xen-devel] [PATCH v3 16/24] x86/emul: Avoid raising faults behind the emulators back

2016-11-30 Thread Andrew Cooper
Introduce a new x86_emul_pagefault() similar to x86_emul_hw_exception(), and use this instead of hvm_inject_page_fault() from emulation codepaths. Signed-off-by: Andrew Cooper Reviewed-by: Paul Durrant Reviewed-by: Jan Beulich --- v2: * Change x86_emul_pagefault()'s error_code parameter to bei

[Xen-devel] [OSSTEST PATCH 2/2] Executive database: stub out use of LOCK TABLES

2016-11-30 Thread Ian Jackson
We want to improve database performance, and one of the problems is excessive locking. Postgresql now has predictate locking, and we have, we think, eliminated all the places that do not handle a database transaction failure. So we can rely on optimistic concurrency. So, eliminate all uses of LO

[Xen-devel] [OSSTEST PATCH 1/2] Executive database: set isolation level in Perl

2016-11-30 Thread Ian Jackson
The Perl was lacking SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, which is sadly not the default. Currently that does not matter because of all the table locking, but we are about to abolish that. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 3 +++ 1 file changed, 3 insertions(+

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Shanker Donthineni
Hi Julien, On 11/30/2016 04:29 AM, Julien Grall wrote: Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise, system gets panic when dom0 accesses its MMIO registers. The current

Re: [Xen-devel] [PATCH v2 06/19] x86/pv: Implement pv_inject_{event, page_fault, hw_exception}()

2016-11-30 Thread Andrew Cooper
On 30/11/16 08:41, Jan Beulich wrote: if ( unlikely(null_trap_bounce(v, tb)) ) -gprintk(XENLOG_WARNING, -"Unhandled %s fault/trap [#%d, ec=%04x]\n", -trapstr(trapnr), trapnr, regs->error_code); +{ +if ( vector ==

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Julien Grall
On 30/11/16 14:31, Shanker Donthineni wrote: Hi Julien, Hi Shanker, On 11/30/2016 04:29 AM, Julien Grall wrote: Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise, system

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Shanker Donthineni
Hi Julien, On 11/30/2016 08:31 AM, Shanker Donthineni wrote: Hi Julien, On 11/30/2016 04:29 AM, Julien Grall wrote: Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise, syst

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Julien Grall
On 30/11/16 14:43, Shanker Donthineni wrote: Hi Julien, Hi Shanker, On 11/30/2016 08:31 AM, Shanker Donthineni wrote: On 11/30/2016 04:29 AM, Julien Grall wrote: Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emula

Re: [Xen-devel] [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union

2016-11-30 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 30 November 2016 13:50 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant > Subject: [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union > > Rename byte to raw, as the fie

Re: [Xen-devel] [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union

2016-11-30 Thread Andrew Cooper
On 30/11/16 13:58, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 30 November 2016 13:50 >> To: Xen-devel >> Cc: Andrew Cooper ; Jan Beulich >> ; Paul Durrant >> Subject: [PATCH v3 07/24] x86/emul: Clean up the naming of the re

Re: [Xen-devel] [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union

2016-11-30 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 30 November 2016 14:02 > To: Paul Durrant ; Xen-devel de...@lists.xen.org> > Cc: Jan Beulich > Subject: Re: [PATCH v3 07/24] x86/emul: Clean up the naming of the retire > union > > On 30/11/16 13:58, Paul Durrant wrote: > >> -Origina

[Xen-devel] Xen ARM - Exposing a PL011 to the guest

2016-11-30 Thread Julien Grall
Hi all, Few months ago, Linaro has published the version 2 of the VM specification [1]. For those who don't know, the specification provides guidelines to guarantee a compliant OS images could run on various hypervisor (e.g Xen, KVM). Looking at the specification, it will require Xen to ex

Re: [Xen-devel] [PATCH v3.1 15/15] xen/x86: setup PVHv2 Dom0 ACPI tables

2016-11-30 Thread Roger Pau Monne
On Wed, Nov 30, 2016 at 07:09:47AM -0700, Jan Beulich wrote: > >>> On 30.11.16 at 13:40, wrote: > > On Mon, Nov 14, 2016 at 09:15:37AM -0700, Jan Beulich wrote: > >> >>> On 29.10.16 at 11:00, wrote: > >> > Also, regions marked as E820_ACPI or E820_NVS are identity mapped into > >> > Dom0 > >> >

[Xen-devel] [xen-4.5-testing test] 102721: tolerable FAIL - PUSHED

2016-11-30 Thread osstest service owner
flight 102721 xen-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/102721/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 13 guest-localmigrate fail like 102543 test-amd64-i386-xl-qemuu

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Shanker Donthineni
Hi Julien, We are using Fu's [v5] patch series https://patchwork.codeaurora.org/patch/20325/ in our testing. We thought system crash in xen was related to watchdog timer driver, so removed the watchdog timer sections including GT blocks in GTDT to fix the crash. Let me root cause the issue a

Re: [Xen-devel] [PATCH v3 11/24] x86/emul: Implement singlestep as a retire flag

2016-11-30 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 30 November 2016 13:50 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Tim (Xen.org) ; Paul Durrant > > Subject: [PATCH v3 11/24] x86/emul: Implement singlestep as a retire flag > > The behaviour

Re: [Xen-devel] [PATCH v3 22/24] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-30 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 30 November 2016 13:51 > To: Xen-devel > Cc: Andrew Cooper ; Paul Durrant > > Subject: [PATCH v3 22/24] x86/hvm: Avoid __hvm_copy() raising #PF behind > the emulators back > > Drop the call to hvm_injec

Re: [Xen-devel] [PATCH v3 13/24] x86/emul: Rework emulator event injection

2016-11-30 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 30 November 2016 13:51 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant ; Tim > (Xen.org) ; George Dunlap > Subject: [PATCH v3 13/24] x86/emul: Rework emulator event injection > > The

Re: [Xen-devel] [PATCH] xen/arm: Fix misplaced parentheses for PSCI version check

2016-11-30 Thread Julien Grall
Hi Artem, On 30/11/16 13:53, Artem Mygaiev wrote: Fix misplaced parentheses for PSCI version check Signed-off-by: Artem Mygaiev Can you please include the coverity ID: Coverity-ID: 1381830 With that: Reviewed-by: Julien Grall This has been introduced by me in commit 2831f20 "xen/arm: Ad

Re: [Xen-devel] Xen ARM - Exposing a PL011 to the guest

2016-11-30 Thread Christoffer Dall
On Wed, Nov 30, 2016 at 03:29:32PM +, Julien Grall wrote: > Hi all, > > Few months ago, Linaro has published the version 2 of the VM > specification [1]. > > For those who don't know, the specification provides guidelines to > guarantee a compliant OS images could run on various hypervisor (e

Re: [Xen-devel] [PATCH v3.1 15/15] xen/x86: setup PVHv2 Dom0 ACPI tables

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 15:23, wrote: > On Wed, Nov 30, 2016 at 07:09:47AM -0700, Jan Beulich wrote: >> >>> On 30.11.16 at 13:40, wrote: >> > On Mon, Nov 14, 2016 at 09:15:37AM -0700, Jan Beulich wrote: >> >> >>> On 29.10.16 at 11:00, wrote: >> >> > Also, regions marked as E820_ACPI or E820_NVS are i

Re: [Xen-devel] [PATCH RFC 1/2] xen/page_alloc: Add size_align parameter to provide MFNs which are size aligned.

2016-11-30 Thread Konrad Rzeszutek Wilk
On Wed, Nov 30, 2016 at 02:30:41AM -0700, Jan Beulich wrote: > >>> On 30.11.16 at 05:39, wrote: > > This is to support the requirement that exists in PV dom0 > > when doing DMA requests: > > > > "dma_alloc_coherent() > > [...] > > The CPU virtual address and the DMA address are both guaranteed to

Re: [Xen-devel] [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 15:05, wrote: >> From: Andrew Cooper >> Sent: 30 November 2016 14:02 >> On 30/11/16 13:58, Paul Durrant wrote: >> > Also, anonymous unions are not part of C99 AFAIK... are we now stipulating >> something more recent? >> >> We used gnu99 for as long as I can remember, and we hav

Re: [Xen-devel] [PATCH RFC 1/2] xen/page_alloc: Add size_align parameter to provide MFNs which are size aligned.

2016-11-30 Thread Jan Beulich
>>> On 30.11.16 at 17:42, wrote: > On Wed, Nov 30, 2016 at 02:30:41AM -0700, Jan Beulich wrote: >> >>> On 30.11.16 at 05:39, wrote: >> > This is to support the requirement that exists in PV dom0 >> > when doing DMA requests: >> > >> > "dma_alloc_coherent() >> > [...] >> > The CPU virtual address

[Xen-devel] [PATCH v4 08/14] xen/x86: allow the emulated APICs to be enabled for the hardware domain

2016-11-30 Thread Roger Pau Monne
Allow the use of both the emulated local APIC and IO APIC for the hardware domain. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v3: - Don't enable the emulated PIT for PVHv2 Dom0. Changes since v2: - Allow all PV guests to use the emulated PIT. Chan

[Xen-devel] [PATCH v4 02/14] xen/x86: fix return value of *_set_allocation functions

2016-11-30 Thread Roger Pau Monne
Return should be an int. Signed-off-by: Roger Pau Monné Acked-by: George Dunlap Acked-by: Tim Deegan --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Tim Deegan --- Changes since v2: - Also fix the callers to treat the return value as an int. - Don't convert the pages parameter

[Xen-devel] [PATCH v4 06/14] x86/vtd: refuse to enable IOMMU if the PCI scan fails

2016-11-30 Thread Roger Pau Monne
This provides uniform behavior between Intel and AMD IOMMU initialization, and is a requirement for PVHv2 Dom0, that depends on a working IOMMU plus the PCI bus being scanned for devices. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Kevin Tian Cc: Feng Wu --- Chang

[Xen-devel] [PATCH v4 14/14] xen/x86: setup PVHv2 Dom0 ACPI tables

2016-11-30 Thread Roger Pau Monne
Create a new MADT table that contains the topology exposed to the guest. A new XSDT table is also created, in order to filter the tables that we want to expose to the guest, plus the Xen crafted MADT. This in turn requires Xen to also create a new RSDP in order to make it point to the custom XSDT.

[Xen-devel] [PATCH v4 04/14] x86/paging: introduce paging_set_allocation

2016-11-30 Thread Roger Pau Monne
... and remove hap_set_alloc_for_pvh_dom0. While there also change the last parameter of the {hap/shadow}_set_allocation functions to be a boolean. Signed-off-by: Roger Pau Monné Acked-by: Tim Deegan Acked-by: George Dunlap Reviewed-by: Jan Beulich --- Cc: Jan Beulich Cc: Andrew Cooper Cc: G

  1   2   >