Re: [Xen-devel] [PATCH v3 01/11] x86/domctl: Add XEN_DOMCTL_set_avail_vcpus

2016-11-28 Thread Jan Beulich
>>> On 25.11.16 at 19:16, wrote: > BTW, another thing I am afraid I will have to do is extract > hvm_hw_timer_pm from PMTState and move it up to hvm_domain. > > It already has pm1a_{sts|en} and this series adds its own version of > that register, which doesn't make sense. Instead, both will ref

Re: [Xen-devel] XEN tools for ARM64 build issue

2016-11-28 Thread Jan Beulich
>>> On 25.11.16 at 18:59, wrote: > On 25/11/16 17:00, Julien Grall wrote: >> On 25/11/16 15:52, Jan Beulich wrote: >> On 25.11.16 at 16:30, wrote: On 23/11/16 10:47, Jan Beulich wrote: On 23.11.16 at 11:29, wrote: >> Building latest XEN master branch >> (58bd0c7985890e0

Re: [Xen-devel] [PATCH for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Jan Beulich
>>> On 25.11.16 at 20:06, wrote: > --- a/tools/libacpi/Makefile > +++ b/tools/libacpi/Makefile > @@ -27,6 +27,11 @@ DSDT_FILES ?= $(C_SRC-y) > C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, $(DSDT_FILES)) > H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h ssdt_pm.h > ssdt_tpm.h) > > +MKDS

Re: [Xen-devel] [PATCH for-4.8] x86/cpu: Reposition stack alignment check

2016-11-28 Thread Jan Beulich
>>> On 25.11.16 at 20:04, wrote: > As identified during review, using BUG_ON() before `lidt` will result in a > triple fault, even on APs. Oh, I did commit v1 instead of v2, sorry. > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich ___ Xen-de

Re: [Xen-devel] [PATCH for-4.8] x86/cpu: Reposition stack alignment check

2016-11-28 Thread Jan Beulich
>>> On 25.11.16 at 20:04, wrote: > @@ -672,6 +667,15 @@ void load_system_tables(void) > asm volatile ("lidt %0" : : "m" (idtr) ); > asm volatile ("ltr %w0" : : "rm" (TSS_ENTRY << 3) ); > asm volatile ("lldt %w0" : : "rm" (0) ); > + > + /* > + * Bottom-of-stack must

[Xen-devel] Intentional EPT Misconfigurations in xen

2016-11-28 Thread 唐伟文
Hi, I have a question that why dose xen hypervisor set entry of ept as invalid (misconfigured) deliberately which will cause VM exit resulting from EPT Misconfigurations. http://xenbits.xenproject.org/gitweb/?p=xen.git;a=commit;h=aa9114edd97b292cd89b3616e3f2089471fd2201 I find the answer in this w

Re: [Xen-devel] [PATCH v1] libxl: Make an ACPI support build for ARM64 configurable.

2016-11-28 Thread Andrii Anisov
Julien, > There is no automatic test on all the possible configurations, although we > have > travis to test build (and not booting) a random Kconfig. I guess there is no need to test booting of a "random" Kconfig within the mainline anyway. The full-featured defconfig would be enough to be prov

[Xen-devel] Kernel Panics on Xen ARM64 for Domain0 and Guest

2016-11-28 Thread Wei Chen
Hi, I have found a commit in "PER-CPU MEMORY ALLOCATOR" will panic the kernels that are runing on ARM64 Xen (include Domain0 and Guest). commit 3ca45a46f8af8c4a92dd8a08eac57787242d5021 percpu: ensure the requested alignment is power of two If I revert this commit, the Kernels can work properly o

Re: [Xen-devel] Intentional EPT Misconfigurations in xen

2016-11-28 Thread Andrew Cooper
On 28/11/16 08:44, 唐伟文 wrote: > Hi, > > I have a question that why dose xen hypervisor set entry of ept as > invalid (misconfigured) deliberately which will cause VM exit > resulting from EPT > Misconfigurations. > http://xenbits.xenproject.org/gitweb/?p=xen.git;a=commit;h=aa9114edd97b292cd89b3616

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

2016-11-28 Thread Lars Kurth
On 22/11/2016 13:54, "Artem Mygaiev" wrote: >On 22.11.16 15:42, Andrew Cooper wrote: >> >> >> The only way we could scan for ARM is if we could be given multiple >> different streams (one per arch) to use, and Coverity have already said >> no to this request. This is a politics problem, not a

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

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

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

2016-11-28 Thread Artem Mygaiev
On 28.11.16 12:27, Lars Kurth wrote: > On 22/11/2016 13:54, "Artem Mygaiev" wrote: >> On 22.11.16 15:42, Andrew Cooper wrote: >>> The only way we could scan for ARM is if we could be given multiple >>> different streams (one per arch) to use, and Coverity have already said >>> no to this request.

Re: [Xen-devel] arm64: Approach for DT based NUMA and issues

2016-11-28 Thread Vijay Kilari
On Mon, Nov 28, 2016 at 2:21 AM, Dario Faggioli wrote: > On Sun, 2016-11-27 at 12:23 +, Julien Grall wrote: >> Hi Dario, >> > Hi, > >> On 27/11/2016 01:01, Dario Faggioli wrote: >> > On Sat, 2016-11-26 at 12:29 +0530, Vijay Kilari wrote: >> > I agree that we need to support vNUMA for Dom0 soon

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

2016-11-28 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

[Xen-devel] [PATCH v2 08/19] x86/emul: Rework emulator event injection

2016-11-28 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 v2 02/19] x86/emul: Drop X86EMUL_CMPXCHG_FAILED

2016-11-28 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 for-4.9 v2 00/19] XSA-191 followup

2016-11-28 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 patch 19 to avoid opencoding all of the segmenation logic. This version of the patche

[Xen-devel] [PATCH v2 07/19] x86/emul: Remove opencoded exception generation

2016-11-28 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 v2 01/19] x86/shadow: Fix #PFs from emulated writes crossing a page boundary

2016-11-28 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 --- CC: Jan Be

[Xen-devel] [PATCH v2 05/19] x86/emul: Rename HVM_DELIVER_NO_ERROR_CODE to X86_EVENT_NO_EC

2016-11-28 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 v2 03/19] x86/emul: Simplfy emulation state setup

2016-11-28 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 v2 09/19] x86/vmx: Use hvm_{get, set}_segment_register() rather than vmx_{get, set}_segment_register()

2016-11-28 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 v2 04/19] x86/emul: Rename hvm_trap to x86_event and move it into the emulation infrastructure

2016-11-28 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 v2 19/19] x86/hvm: Use system-segment relative memory accesses

2016-11-28 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 v2 12/19] x86/pv: Avoid raising faults behind the emulators back

2016-11-28 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. While fixing this, fix the singlestep behaviour. Previously, an otherwise successful emulation

[Xen-devel] [PATCH v2 15/19] x86/hvm: Reimplement hvm_copy_*_nofault() in terms of no pagefault_info

2016-11-28 Thread Andrew Cooper
No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Tim Deegan --- CC: 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 v2 13/19] x86/shadow: Avoid raising faults behind the emulators back

2016-11-28 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 v2 10/19] x86/hvm: Reposition the modification of raw segment data from the VMCB/VMCS

2016-11-28 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 v2 11/19] x86/emul: Avoid raising faults behind the emulators back

2016-11-28 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 --- CC: Jan Beulich CC: Paul Durrant v2: * Change x86_emul_pagefault()'s error_code parameter to being signed * Spli

[Xen-devel] [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-28 Thread Andrew Cooper
Drop the call to hvm_inject_page_fault() in __hvm_copy(), and require callers to inject the pagefault themselves. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Paul Durrant CC: Tim Deegan CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/emulate.c|

[Xen-devel] [PATCH v2 16/19] x86/hvm: Rename hvm_copy_*_guest_virt() to hvm_copy_*_guest_linear()

2016-11-28 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 --- CC: Paul Durrant --- xen/arch/x86/hvm/emulate.c

[Xen-devel] [PATCH v2 18/19] x86/hvm: Prepare to allow use of system segments for memory references

2016-11-28 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 v2 14/19] x86/hvm: Extend the hvm_copy_*() API with a pagefault_info pointer

2016-11-28 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

Re: [Xen-devel] [PATCH v3.1 12/15] xen/x86: populate PVHv2 Dom0 physical memory map

2016-11-28 Thread Roger Pau Monne
On Fri, Nov 11, 2016 at 10:16:43AM -0700, Jan Beulich wrote: > >>> On 29.10.16 at 10:59, wrote: > > +static int __init hvm_populate_memory_range(struct domain *d, uint64_t > > start, > > + uint64_t size) > > +{ > > +unsigned int order, i = 0; > > +

Re: [Xen-devel] [PATCH v3.1 12/15] xen/x86: populate PVHv2 Dom0 physical memory map

2016-11-28 Thread Jan Beulich
>>> On 28.11.16 at 12:26, wrote: > On Fri, Nov 11, 2016 at 10:16:43AM -0700, Jan Beulich wrote: >> >>> On 29.10.16 at 10:59, wrote: >> > +static int __init hvm_steal_ram(struct domain *d, unsigned long size, >> > +paddr_t limit, paddr_t *addr) >> > +{ >> > +uns

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

2016-11-28 Thread Tim Deegan
At 11:13 + on 28 Nov (1480331598), Andrew Cooper wrote: > 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 pagef

Re: [Xen-devel] [PATCH v2 02/19] x86/emul: Drop X86EMUL_CMPXCHG_FAILED

2016-11-28 Thread Tim Deegan
At 11:13 + on 28 Nov (1480331599), Andrew Cooper wrote: > 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.

Re: [Xen-devel] [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 28 November 2016 11:14 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant ; Tim > (Xen.org) ; Jun Nakajima ; Kevin > Tian > Subject: [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #

Re: [Xen-devel] [PATCH v2 03/19] x86/emul: Simplfy emulation state setup

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 28 November 2016 11:13 > To: Xen-devel > Cc: Andrew Cooper ; George Dunlap > ; Paul Durrant > Subject: [PATCH v2 03/19] x86/emul: Simplfy emulation state setup > > The current code to set up emulation s

Re: [Xen-devel] Kernel Panics on Xen ARM64 for Domain0 and Guest

2016-11-28 Thread Julien Grall
] Modules linked in: [0.024708] [0.024804] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-rc7-next-20161128 #473 [0.025012] Hardware name: Foundation-v8A (DT) [0.025162] task: 80003d87 task.stack: 80003d844000 [0.025351] PC is at pcpu_alloc+0x88/0x6c0 [0.025490

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

2016-11-28 Thread Tim Deegan
At 11:13 + on 28 Nov (1480331603), Andrew Cooper wrote: > 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_injec

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

2016-11-28 Thread Andrew Cooper
On 28/11/16 11:58, Tim Deegan wrote: > At 11:13 + on 28 Nov (1480331603), Andrew Cooper wrote: >> 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() a

Re: [Xen-devel] [PATCH v2 16/19] x86/hvm: Rename hvm_copy_*_guest_virt() to hvm_copy_*_guest_linear()

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 28 November 2016 11:14 > To: Xen-devel > Cc: Andrew Cooper ; Paul Durrant > > Subject: [PATCH v2 16/19] x86/hvm: Rename hvm_copy_*_guest_virt() to > hvm_copy_*_guest_linear() > > The functions use linea

Re: [Xen-devel] [PATCH v2 08/19] x86/emul: Rework emulator event injection

2016-11-28 Thread Tim Deegan
At 11:13 + on 28 Nov (1480331605), Andrew Cooper wrote: > 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

Re: [Xen-devel] [PATCH v3.1 13/15] xen/x86: parse Dom0 kernel for PVHv2

2016-11-28 Thread Roger Pau Monne
On Fri, Nov 11, 2016 at 03:30:17PM -0500, Konrad Rzeszutek Wilk wrote: > On Sat, Oct 29, 2016 at 10:59:59AM +0200, Roger Pau Monne wrote: > > Introduce a helper to parse the Dom0 kernel. > > > > Signed-off-by: Roger Pau Monné > > --- > > Cc: Jan Beulich > > Cc: Andrew Cooper > > --- > > Changes

[Xen-devel] [xen-unstable test] 102686: tolerable trouble: broken/fail/pass

2016-11-28 Thread osstest service owner
flight 102686 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/102686/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-arndale 3 host-install(3) broken pass in 102674 test-amd64-amd64-xl-qemuu-debian

[Xen-devel] [qemu-upstream-4.6-testing test] 102688: regressions - FAIL

2016-11-28 Thread osstest service owner
flight 102688 qemu-upstream-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/102688/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt 13 saverestore-support-check fail REGR. vs. 99723 test-

Re: [Xen-devel] arm64: Approach for DT based NUMA and issues

2016-11-28 Thread Dario Faggioli
On Mon, 2016-11-28 at 16:32 +0530, Vijay Kilari wrote: > On Mon, Nov 28, 2016 at 2:21 AM, Dario Faggioli > wrote: > >  > > That makes perfect sense to me, and FWIW, is also what I'd do. In > > fact, > > the whole point of what I was saying was not to confuse Xen NUMA > > support and Dom0 NUMA supp

[Xen-devel] [PATCH v13] sndif: add ABI for para-virtual sound

2016-11-28 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Hi, all! Please find the next version of the ABI for the PV sound after addressing review comments. Thank you, Oleksandr Andrushchenko Oleksandr Grytsov Oleksandr Andrushchenko (1): This is the ABI for the two halves of a para-virtualized sound driver to

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

2016-11-28 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Oleksandr Grytsov Signed-off-by: Oleksandr Dmytryshyn Signed-off-by: Iurii Konovalenko --- Changes since v1: * removed __attribute__((__packed__)) from all structures definitions Changes since v2: * remove

Re: [Xen-devel] [ler...@redhat.com: Re: [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier]

2016-11-28 Thread Anthony PERARD
On Fri, Nov 25, 2016 at 08:24:00AM -0500, Konrad Rzeszutek Wilk wrote: > Hey Wei, Anthony, > > Are you guys OK pushing this commit: 2667ad40919a in the > git://xenbits.xen.org/ovmf.git > > tree? Without this I cannot build Xen 4.8 with TianoCore > (--enable-ovmf). Can you actually start a g

Re: [Xen-devel] XEN tools for ARM64 build issue

2016-11-28 Thread Julien Grall
create ^ title it tools/acpi: Make mk_dsdt more architecture agnostic severity it wishlist thanks On 28/11/16 08:02, Jan Beulich wrote: On 25.11.16 at 18:59, wrote: On 25/11/16 17:00, Julien Grall wrote: On 25/11/16 15:52, Jan Beulich wrote: On 25.11.16 at 16:30, wrote: On 23/11/16 10:47,

Re: [Xen-devel] [PATCH v2 11/19] x86/emul: Avoid raising faults behind the emulators back

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 28 November 2016 11:13 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant > Subject: [PATCH v2 11/19] x86/emul: Avoid raising faults behind the > emulators back > > Introduce a new x86_e

Re: [Xen-devel] [PATCH v2 08/19] x86/emul: Rework emulator event injection

2016-11-28 Thread Andrew Cooper
On 28/11/16 12:04, Tim Deegan wrote: > At 11:13 + on 28 Nov (1480331605), Andrew Cooper wrote: >> 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 visi

Re: [Xen-devel] [PATCH for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Jungseok Lee
On Nov 26, 2016, at 4:06 AM, Julien Grall wrote: Hi Julien and Xen folks, > The tools (such as mk_dsdt) can be cross-built when it may not be > desirable to build them on the target. > > The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" > introduced support of ARM64 in mk_dsdt but

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

2016-11-28 Thread osstest service owner
flight 102691 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/102691/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4e3b05a49f454bc257252ae9090421e3c8447737 baseline version: ovmf 418373a1cd97abc0c0e35

Re: [Xen-devel] [PATCH for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Julien Grall
Hi Jan, On 28/11/16 08:10, Jan Beulich wrote: On 25.11.16 at 20:06, wrote: --- a/tools/libacpi/Makefile +++ b/tools/libacpi/Makefile @@ -27,6 +27,11 @@ DSDT_FILES ?= $(C_SRC-y) C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, $(DSDT_FILES)) H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h

Re: [Xen-devel] [PATCH v2 03/19] x86/emul: Simplfy emulation state setup

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 28 November 2016 11:13 > To: Xen-devel > Cc: Andrew Cooper ; George Dunlap > ; Paul Durrant > Subject: [PATCH v2 03/19] x86/emul: Simplfy emulation state setup > > The current code to set up emulation s

[Xen-devel] XC_PAGE_SIZE for Linux kernel

2016-11-28 Thread Oleksandr Andrushchenko
Hi, all! I cannot find any definition of XC_PAGE_SIZE for Linux kernel. Is it by intention or just missed? I am writing a PV front drivers now and forced either to define XC_PAGE_SIZE == PAGE_SIZE or use PAGE_SIZE directly. Strictly speaking both workarounds are not correct. Thank you, Olek

Re: [Xen-devel] [PATCH v2 15/19] x86/hvm: Reimplement hvm_copy_*_nofault() in terms of no pagefault_info

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 28 November 2016 11:14 > To: Xen-devel > Cc: Andrew Cooper ; Paul Durrant > > Subject: [PATCH v2 15/19] x86/hvm: Reimplement hvm_copy_*_nofault() in > terms of no pagefault_info > > No functional change

Re: [Xen-devel] [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-28 Thread Andrew Cooper
On 28/11/16 11:56, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 28 November 2016 11:14 >> To: Xen-devel >> Cc: Andrew Cooper ; Jan Beulich >> ; Paul Durrant ; Tim >> (Xen.org) ; Jun Nakajima ; Kevin >> Tian >> Subject: [PATCH

[Xen-devel] Processed: Re: XEN tools for ARM64 build issue

2016-11-28 Thread xen
Processing commands for x...@bugs.xenproject.org: > create ^ Created new bug #55 rooted at `<583bf2b3027800122...@prv-mh.provo.novell.com>' Title: `Re: [Xen-devel] XEN tools for ARM64 build issue' > title it tools/acpi: Make mk_dsdt more architecture agnostic Set title for #55 to `tools/acpi:

Re: [Xen-devel] [PATCH for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Julien Grall
Hi Andrew, On 25/11/16 19:12, Andrew Cooper wrote: On 25/11/16 19:06, Julien Grall wrote: The tools (such as mk_dsdt) can be cross-built when it may not be desirable to build them on the target. The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" introduced support of ARM64 in mk_

Re: [Xen-devel] [PATCH for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Andrew Cooper
On 28/11/16 13:00, Julien Grall wrote: > Hi Andrew, > > On 25/11/16 19:12, Andrew Cooper wrote: >> On 25/11/16 19:06, Julien Grall wrote: >>> The tools (such as mk_dsdt) can be cross-built when it may not be >>> desirable to build them on the target. >>> >>> The commit c4ac1077 "libxl/arm: Generate

Re: [Xen-devel] [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-28 Thread Andrew Cooper
On 28/11/16 13:01, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper >> Sent: 28 November 2016 12:58 >> To: Paul Durrant ; Xen-devel > de...@lists.xen.org> >> Cc: Jan Beulich ; Tim (Xen.org) ; Jun >> Nakajima ; Kevin Tian >> Subject: Re: [PATCH v2 17/19] x86/hvm: Avoid __hvm

Re: [Xen-devel] [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-28 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 28 November 2016 12:58 > To: Paul Durrant ; Xen-devel de...@lists.xen.org> > Cc: Jan Beulich ; Tim (Xen.org) ; Jun > Nakajima ; Kevin Tian > Subject: Re: [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF > behind the emulators back

[Xen-devel] [PATCH v2 for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Julien Grall
The tools (such as mk_dsdt) can be cross-built when it may not be desirable to build them on the target. The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" introduced support of ARM64 in mk_dsdt but also break cross-building tools because the ACPI tables are not correct. While mk_ds

Re: [Xen-devel] [PATCH v4] xen/gntdev: Use VM_MIXEDMAP instead of VM_IO to avoid NUMA balancing

2016-11-28 Thread Juergen Gross
On 21/11/16 15:56, Boris Ostrovsky wrote: > Commit 9c17d96500f7 ("xen/gntdev: Grant maps should not be subject to > NUMA balancing") set VM_IO flag to prevent grant maps from being > subjected to NUMA balancing. > > It was discovered recently that this flag causes get_user_pages() to > always fail

Re: [Xen-devel] XC_PAGE_SIZE for Linux kernel

2016-11-28 Thread Julien Grall
On 28/11/16 12:56, Oleksandr Andrushchenko wrote: Hi, all! Hi, I cannot find any definition of XC_PAGE_SIZE for Linux kernel. Is it by intention or just missed? I am writing a PV front drivers now and forced either to define XC_PAGE_SIZE == PAGE_SIZE or use PAGE_SIZE directly. Strictly

Re: [Xen-devel] XC_PAGE_SIZE for Linux kernel

2016-11-28 Thread Oleksandr Andrushchenko
On 11/28/2016 03:17 PM, Julien Grall wrote: On 28/11/16 12:56, Oleksandr Andrushchenko wrote: Hi, all! Hi, I cannot find any definition of XC_PAGE_SIZE for Linux kernel. Is it by intention or just missed? I am writing a PV front drivers now and forced either to define XC_PAGE_SIZE == P

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

2016-11-28 Thread Jan Beulich
>>> On 28.11.16 at 13:30, wrote: > + * Request open - open a PCM stream for playback or capture: > + * 0 1 23 > octet > + * +-+-+-+-+ > + * | id

Re: [Xen-devel] Payed Xen Admin

2016-11-28 Thread Neil Sikka
Usually, I've seen (null) domains are not running but their Qemu DMs are running. You could probably remove the (null) from the list by using "kill -9" on the qemu pids. On Nov 27, 2016 11:55 PM, "Michael Schinzel" wrote: > Good Morning, > > > > we have some issues with our Xen Hosts. It seems i

Re: [Xen-devel] [PATCH v2 for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Jan Beulich
>>> On 28.11.16 at 14:13, wrote: > The tools (such as mk_dsdt) can be cross-built when it may not be > desirable to build them on the target. > > The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" > introduced support of ARM64 in mk_dsdt but also break cross-building > tools because

Re: [Xen-devel] [PATCH v3.1 12/15] xen/x86: populate PVHv2 Dom0 physical memory map

2016-11-28 Thread Roger Pau Monne
On Mon, Nov 28, 2016 at 04:41:22AM -0700, Jan Beulich wrote: > >>> On 28.11.16 at 12:26, wrote: > > On Fri, Nov 11, 2016 at 10:16:43AM -0700, Jan Beulich wrote: > >> >>> On 29.10.16 at 10:59, wrote: > >> > +static int __init hvm_steal_ram(struct domain *d, unsigned long size, > >> > +

Re: [Xen-devel] [PATCH v2 for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Julien Grall
Hi, On 28/11/16 13:30, Jan Beulich wrote: On 28.11.16 at 14:13, wrote: The tools (such as mk_dsdt) can be cross-built when it may not be desirable to build them on the target. The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" introduced support of ARM64 in mk_dsdt but also brea

Re: [Xen-devel] [PATCH] x86/SVM: don't deliver #GP without error code

2016-11-28 Thread Boris Ostrovsky
On 11/24/2016 09:13 AM, Jan Beulich wrote: > Signed-off-by: Jan Beulich Reviewed-by: Boris Ostrovsky (even though it's already been applied) ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Jan Beulich
>>> On 28.11.16 at 14:37, wrote: > On 28/11/16 13:30, Jan Beulich wrote: >> However, ... >> >>> --- a/tools/libacpi/mk_dsdt.c >>> +++ b/tools/libacpi/mk_dsdt.c >>> @@ -17,9 +17,9 @@ >>> #include >>> #include >>> #include >>> -#if defined(__i386__) || defined(__x86_64__) >>> +#if defined(CONF

Re: [Xen-devel] some thoughts about merlot{0|1} issues [was: Re: [xen-unstable test] 102522: tolerable FAIL - PUSHED]

2016-11-28 Thread Boris Ostrovsky
On 11/24/2016 10:31 AM, Jan Beulich wrote: On 24.11.16 at 16:14, wrote: >> When dumping ACPI C states, here's how things look like for _all_ CPUs: >> Nov 23 13:13:00.382134 (XEN) ==cpu3== >> Nov 23 13:13:00.382157 (XEN) active state: C-1 >> Nov 23 13:13:00.390096 (XEN) max_cstate:

Re: [Xen-devel] [PATCH v3.1 12/15] xen/x86: populate PVHv2 Dom0 physical memory map

2016-11-28 Thread Jan Beulich
>>> On 28.11.16 at 14:30, wrote: > On Mon, Nov 28, 2016 at 04:41:22AM -0700, Jan Beulich wrote: >> >>> On 28.11.16 at 12:26, wrote: >> > On Fri, Nov 11, 2016 at 10:16:43AM -0700, Jan Beulich wrote: >> >> >>> On 29.10.16 at 10:59, wrote: >> >> > +saved_current = current; >> >> > +

Re: [Xen-devel] arm64: Approach for DT based NUMA and issues

2016-11-28 Thread Andre Przywara
Hi Vijay, On 26/11/16 06:59, Vijay Kilari wrote: > Hi, > >Below basic write up on DT based NUMA feature support for arm64 platform. > I have attempted to get NUMA support, However I face below issues. I would > like > to discuss these issues. Please let me know your comments on this. Yet to

[Xen-devel] [PATCH] libxl: invert xc and domain model resume calls in xc_domain_resume()

2016-11-28 Thread Cédric Bosdonnat
Resume is sometimes silently failing for HVM guests. Getting the xc_domain_resume() and libxl__domain_resume_device_model() in the reverse order than what is in the suspend code fixes the problem. Signed-off-by: Cédric Bosdonnat --- tools/libxl/libxl_dom_suspend.c | 12 ++-- 1 file chang

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

2016-11-28 Thread Oleksandr Andrushchenko
On 11/28/2016 03:27 PM, Jan Beulich wrote: On 28.11.16 at 13:30, wrote: + * Request open - open a PCM stream for playback or capture: + * 0 1 23 octet + * +-+-+-+-+

[Xen-devel] [ovmf baseline-only test] 68112: all pass

2016-11-28 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 68112 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/68112/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 418373a1cd97abc0c0e3557f7a00105291829e6f baseline v

Re: [Xen-devel] [PATCH v2 10/19] x86/hvm: Reposition the modification of raw segment data from the VMCB/VMCS

2016-11-28 Thread Boris Ostrovsky
On 11/28/2016 06:13 AM, Andrew Cooper wrote: > 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 function

Re: [Xen-devel] [PATCH v2 for-4.8] tools/libacpi: Fix compilation when cross building the tools

2016-11-28 Thread Wei Liu
On Mon, Nov 28, 2016 at 06:30:58AM -0700, Jan Beulich wrote: > >>> On 28.11.16 at 14:13, wrote: > > The tools (such as mk_dsdt) can be cross-built when it may not be > > desirable to build them on the target. > > > > The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" > > introduced

Re: [Xen-devel] [PATCH v2 08/19] x86/emul: Rework emulator event injection

2016-11-28 Thread Tim Deegan
At 12:48 + on 28 Nov (1480337304), Andrew Cooper wrote: > On 28/11/16 12:04, Tim Deegan wrote: > > At 11:13 + on 28 Nov (1480331605), Andrew Cooper wrote: > >> +/* > >> * NB. We do not unshadow on X86EMUL_EXCEPTION. It's not clear that it > >> * would be a good unshadow hint

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

2016-11-28 Thread Julien Grall
Hi Oleksandr, On 28/11/16 14:12, Oleksandr Andrushchenko wrote: On 11/28/2016 03:27 PM, Jan Beulich wrote: + * + * gref_dir_next_page - grant_ref_t, reference to the next page describing + * page directory. Must be 0 if no more pages in the list. If I am not mistaken 0 is a valid grant.

Re: [Xen-devel] [PATCH v2 08/19] x86/emul: Rework emulator event injection

2016-11-28 Thread Andrew Cooper
On 28/11/16 14:24, Tim Deegan wrote: > At 12:48 + on 28 Nov (1480337304), Andrew Cooper wrote: >> On 28/11/16 12:04, Tim Deegan wrote: >>> At 11:13 + on 28 Nov (1480331605), Andrew Cooper wrote: +/* * NB. We do not unshadow on X86EMUL_EXCEPTION. It's not clear that it >>

Re: [Xen-devel] [PATCH v2 13/19] x86/shadow: Avoid raising faults behind the emulators back

2016-11-28 Thread Tim Deegan
Hi, At 11:13 + on 28 Nov (1480331610), Andrew Cooper wrote: > 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 properl

Re: [Xen-devel] [PATCH v2 17/19] x86/hvm: Avoid __hvm_copy() raising #PF behind the emulators back

2016-11-28 Thread Tim Deegan
At 11:13 + on 28 Nov (1480331614), Andrew Cooper wrote: > Drop the call to hvm_inject_page_fault() in __hvm_copy(), and require callers > to inject the pagefault themselves. This seems like it'd be easy to forget to DTRT with the fault, especially in code being ported forward across this serie

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

2016-11-28 Thread Oleksandr Andrushchenko
On 11/28/2016 04:24 PM, Julien Grall wrote: Hi Oleksandr, On 28/11/16 14:12, Oleksandr Andrushchenko wrote: On 11/28/2016 03:27 PM, Jan Beulich wrote: + * + * gref_dir_next_page - grant_ref_t, reference to the next page describing + * page directory. Must be 0 if no more pages in the list.

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

2016-11-28 Thread Julien Grall
Hi Oleksandr, On 28/11/16 14:56, Oleksandr Andrushchenko wrote: On 11/28/2016 04:24 PM, Julien Grall wrote: Hi Oleksandr, On 28/11/16 14:12, Oleksandr Andrushchenko wrote: On 11/28/2016 03:27 PM, Jan Beulich wrote: + * + * gref_dir_next_page - grant_ref_t, reference to the next page describ

Re: [Xen-devel] [ler...@redhat.com: Re: [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier]

2016-11-28 Thread Konrad Rzeszutek Wilk
On Mon, Nov 28, 2016 at 12:38:08PM +, Anthony PERARD wrote: > On Fri, Nov 25, 2016 at 08:24:00AM -0500, Konrad Rzeszutek Wilk wrote: > > Hey Wei, Anthony, > > > > Are you guys OK pushing this commit: 2667ad40919a in the > > git://xenbits.xen.org/ovmf.git > > > > tree? Without this I cann

Re: [Xen-devel] arm64: Approach for DT based NUMA and issues

2016-11-28 Thread Vijay Kilari
On Mon, Nov 28, 2016 at 7:20 PM, Andre Przywara wrote: > Hi Vijay, > > On 26/11/16 06:59, Vijay Kilari wrote: >> Hi, >> >>Below basic write up on DT based NUMA feature support for arm64 platform. >> I have attempted to get NUMA support, However I face below issues. I would >> like >> to discu

[Xen-devel] [distros-debian-sid test] 68113: tolerable FAIL

2016-11-28 Thread Platform Team regression test user
flight 68113 distros-debian-sid real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/68113/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-amd64-sid-netboot-pygrub 9 debian-di-install fail like 68072 test-amd64-i386-i38

Re: [Xen-devel] [PATCH v3 07/11] pvh/ioreq: Install handlers for ACPI-related PVH IO accesses

2016-11-28 Thread Boris Ostrovsky
On 11/22/2016 09:08 AM, Jan Beulich wrote: On 22.11.16 at 13:38, wrote: >> On 11/22/2016 06:34 AM, Jan Beulich wrote: >> On 21.11.16 at 22:00, wrote: PVH guests will have ACPI accesses emulated by the hypervisor as opposed to QEMU (as is the case for HVM guests) Suppo

Re: [Xen-devel] some thoughts about merlot{0|1} issues [was: Re: [xen-unstable test] 102522: tolerable FAIL - PUSHED]

2016-11-28 Thread Konrad Rzeszutek Wilk
On Mon, Nov 28, 2016 at 08:48:30AM -0500, Boris Ostrovsky wrote: > On 11/24/2016 10:31 AM, Jan Beulich wrote: > On 24.11.16 at 16:14, wrote: > >> When dumping ACPI C states, here's how things look like for _all_ CPUs: > >> Nov 23 13:13:00.382134 (XEN) ==cpu3== > >> Nov 23 13:13:00.382157 (XEN

[Xen-devel] [qemu-upstream-4.7-testing test] 102689: regressions - FAIL

2016-11-28 Thread osstest service owner
flight 102689 qemu-upstream-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/102689/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-xsm 13 saverestore-support-check fail REGR. vs. 100711 test

Re: [Xen-devel] Kernel Panics on Xen ARM64 for Domain0 and Guest

2016-11-28 Thread t...@kernel.org
Hello, On Mon, Nov 28, 2016 at 11:59:15AM +, Julien Grall wrote: > > commit 3ca45a46f8af8c4a92dd8a08eac57787242d5021 > > percpu: ensure the requested alignment is power of two > > It would have been useful to specify the tree used. In this case, > this commit comes from linux-next. I'm surpr

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

2016-11-28 Thread Oleksandr Andrushchenko
On 11/28/2016 05:00 PM, Julien Grall wrote: Hi Oleksandr, On 28/11/16 14:56, Oleksandr Andrushchenko wrote: On 11/28/2016 04:24 PM, Julien Grall wrote: Hi Oleksandr, On 28/11/16 14:12, Oleksandr Andrushchenko wrote: On 11/28/2016 03:27 PM, Jan Beulich wrote: + * + * gref_dir_next_page - gr

  1   2   >