Re: [Xen-devel] [BUG] xen-mceinj tool testing cause dom0 crash

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 02:44, wrote: > On 11/07/17 01:37 -0700, Jan Beulich wrote: >> I don't believe a crash is the expected outcome here. >> > > This test case injects two errors to the same dom0 page. During the > first injection, offline_page() is called to set

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
On Tue, 2017-11-07 at 14:24 +, Igor Druzhinin wrote: > Perhaps I should improve my diagram: > > pCPU1: vCPUx of domain X -> migrate to pCPU2 -> switch to idle > context > -> RCU callbacks -> vcpu_destroy(vCPUy of domain Y) -> > vmx_vcpu_disable_pml() -> vmx_vmcs_clear() (VMCS is trashed at

[Xen-devel] [PATCH 2/2 v2] xen: Fix 16550 UART console for HP Moonshot (Aarch64) platform

2017-11-09 Thread Bhupinder Thakur
The console was not working on HP Moonshot (HPE Proliant Aarch64) because the UART registers were accessed as 8-bit aligned addresses. However, registers are 32-bit aligned for HP Moonshot. Since ACPI/SPCR table does not specify the register shift to be applied to the

[Xen-devel] [PATCH 1/2 v2] xen: Add support for initializing 16550 UART using ACPI

2017-11-09 Thread Bhupinder Thakur
Currently, Xen supports only DT based initialization of 16550 UART. This patch adds support for initializing 16550 UART using ACPI SPCR table. This patch also makes the uart initialization code common between DT and ACPI based initialization. Signed-off-by: Bhupinder Thakur

Re: [Xen-devel] [PATCH] x86/mm: fix a potential race condition in map_pages_to_xen().

2017-11-09 Thread Yu Zhang
On 11/9/2017 5:22 PM, Jan Beulich wrote: On 09.11.17 at 16:29, wrote: In map_pages_to_xen(), a L2 page table entry may be reset to point to a superpage, and its corresponding L1 page table need be freed in such scenario, when these L1 page table entries are

Re: [Xen-devel] [PATCH] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-09 Thread Jan Beulich
>>> On 08.11.17 at 16:44, wrote: > On 11/7/2017 8:40 AM, Jan Beulich wrote: > On 06.11.17 at 18:48, wrote: >>> --- a/Documentation/ABI/testing/sysfs-driver-pciback >>> +++ b/Documentation/ABI/testing/sysfs-driver-pciback >>> @@ -11,3 +11,15

Re: [Xen-devel] [BUG] blkback reporting incorrect number of sectors, unable to boot

2017-11-09 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of > Roger Pau Monné > Sent: 09 November 2017 09:30 > To: Mike Reardon > Cc: Konrad Rzeszutek Wilk ; Jan Beulich > ; xen-devel@lists.xen.org

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Sergey Dyasli
On Thu, 2017-11-09 at 03:17 -0700, Jan Beulich wrote: > > > > On 09.11.17 at 10:54, wrote: > > > > On Tue, 2017-11-07 at 14:24 +, Igor Druzhinin wrote: > > > Perhaps I should improve my diagram: > > > > > > pCPU1: vCPUx of domain X -> migrate to pCPU2 -> switch to idle >

Re: [Xen-devel] [PATCH v1] tools/hotplug: convert proc-xen.mount to proc-xen.service

2017-11-09 Thread Ian Jackson
Olaf Hering writes ("Re: [Xen-devel] [PATCH v1] tools/hotplug: convert proc-xen.mount to proc-xen.service"): > On Wed, Nov 08, Wei Liu wrote: > > But is there really no way to ask nicely to see if systemd would accept > > a change in behaviour? That is, to make proc-xen.mount (or any attempt > >

Re: [Xen-devel] [PATCH 1/2 v2] xen: Add support for initializing 16550 UART using ACPI

2017-11-09 Thread Roger Pau Monné
On Thu, Nov 09, 2017 at 03:49:23PM +0530, Bhupinder Thakur wrote: > Currently, Xen supports only DT based initialization of 16550 UART. > This patch adds support for initializing 16550 UART using ACPI SPCR table. > > This patch also makes the uart initialization code common between DT and > ACPI

[Xen-devel] [PATCH v2 for-next 9/9] coverage: add documentation for LLVM coverage

2017-11-09 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano

[Xen-devel] [PATCH v2 for-next 7/9] coverage: introduce support for llvm profiling

2017-11-09 Thread Roger Pau Monne
Introduce the functionality in order to fill the hooks of the cov_sysctl_ops struct. Note that the functionality is still not wired into the build system. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [PATCH v2 for-next 4/9] gcov: introduce hooks for the sysctl

2017-11-09 Thread Roger Pau Monne
So that other implementations of the sysctl can be added. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc:

[Xen-devel] [PATCH v2 for-next 2/9] gcov: rename folder and header to coverage

2017-11-09 Thread Roger Pau Monne
Preparatory change before adding llvm profiling support. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich

[Xen-devel] [PATCH v2 for-next 5/9] coverage: introduce generic file

2017-11-09 Thread Roger Pau Monne
It will contain the generic implementation of sysctl_cov_op, which will be shared between all the coverage implementations. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson

[Xen-devel] [PATCH v2 for-next 8/9] xsm: add bodge when compiling with llvm coverage support

2017-11-09 Thread Roger Pau Monne
llvm coverage support seems to disable some of the optimizations needed in order to compile xsm, and the end result is that references to __xsm_action_mismatch_detected are left in the object files. Since coverage support cannot be used in production, introduce __xsm_action_mismatch_detected for

[Xen-devel] [PATCH v2 for-next 3/9] gcov: rename sysctl and functions

2017-11-09 Thread Roger Pau Monne
Change gcov to cov (for internal interfaces) or coverage (for the public ones). Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [PATCH v2 for-next 1/9] kconfig/gcov: remove gcc version choice from kconfig

2017-11-09 Thread Roger Pau Monne
Use autodetect only. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk

[Xen-devel] [PATCH v2 for-next 0/9] LLVM coverage support for Xen

2017-11-09 Thread Roger Pau Monne
Hello, The following patch series enables LLVM coverage support for the Xen hypervisor. This first patches are a re-organization of the gcov support, in order to make the support generic for all coverage technologies. This is mostly a name change from gcov -> cov in several places and files,

Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 00:06, wrote: > --- a/drivers/xen/xen-pciback/pci_stub.c > +++ b/drivers/xen/xen-pciback/pci_stub.c > @@ -244,6 +244,91 @@ struct pci_dev *pcistub_get_pci_dev(struct > xen_pcibk_device *pdev, > return found_dev; > } > > +struct pcistub_args {

Re: [Xen-devel] [PATCH] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Jan Beulich
>>> On 08.11.17 at 21:19, wrote: > These tables are pointed to from FADT. Adding them will > result in duplicate entries in the guest's tables. Oh, indeed. Just one small adjustment request: > +static bool __init pvh_acpi_table_in_xsdt(const char *sig) > +{ > +/*

Re: [Xen-devel] [PATCH] x86/mm: fix a potential race condition in map_pages_to_xen().

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 16:29, wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -4844,9 +4844,10 @@ int map_pages_to_xen( > { > unsigned long base_mfn; > > -pl1e = l2e_to_l1e(*pl2e); > if (

[Xen-devel] [linux-4.9 test] 115686: tolerable FAIL - PUSHED

2017-11-09 Thread osstest service owner
flight 115686 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/115686/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail in 115671 pass in 115686

Re: [Xen-devel] [PATCH v2] x86/hvm: do not register hpet mmio during s3 cycle

2017-11-09 Thread Jan Beulich
>>> On 08.11.17 at 20:46, wrote: > Do it once at domain creation (hpet_init). > > Sleep -> Resume cycles will end up crashing an HVM guest with hpet as > the sequence during resume takes the path: > -> hvm_s3_suspend > -> hpet_reset > -> hpet_deinit > ->

Re: [Xen-devel] [BUG] win2008 guest cannot get ip through sriov

2017-11-09 Thread Roger Pau Monné
On Thu, Nov 09, 2017 at 12:22:49AM +, Hao, Xudong wrote: > > Qemu-xen didn't have commit a80363, so I report this issue to ask for sync > > up > > with qemu upstream. Last mail I mean I usually used Qemu Xen tree to do > > test, > > and found out this issue. > > > > Before requesting the

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Jan Beulich
>>> On 07.11.17 at 16:52, wrote: > There is one things that I'm worrying about with this approach: > > At this place we just sync the idle context because we know that we are > going to deal with VMCS later. But what about other potential cases > (perhaps some

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 10:54, wrote: > On Tue, 2017-11-07 at 14:24 +, Igor Druzhinin wrote: >> Perhaps I should improve my diagram: >> >> pCPU1: vCPUx of domain X -> migrate to pCPU2 -> switch to idle >> context >> -> RCU callbacks -> vcpu_destroy(vCPUy of domain Y) -> >>

Re: [Xen-devel] [Qemu-devel] [PATCH v3] xen-disk: use an IOThread per instance

2017-11-09 Thread Stefan Hajnoczi
On Thu, Nov 09, 2017 at 09:30:45AM +, Paul Durrant wrote: > > -Original Message- > > From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > > Sent: 08 November 2017 17:42 > > To: Paul Durrant > > Cc: qemu-de...@nongnu.org; xen-de...@lists.xenproject.org; Anthony

Re: [Xen-devel] [PATCH] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Roger Pau Monné
On Wed, Nov 08, 2017 at 03:19:27PM -0500, Boris Ostrovsky wrote: > These tables are pointed to from FADT. Adding them will > result in duplicate entries in the guest's tables. > > Signed-off-by: Boris Ostrovsky > --- > xen/arch/x86/hvm/dom0_build.c | 17

[Xen-devel] [libvirt test] 115689: regressions - FAIL

2017-11-09 Thread osstest service owner
flight 115689 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/115689/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 115476 build-amd64-libvirt

[Xen-devel] [PATCH v2 for-next 6/9] kconfig/gcov: rename to coverage

2017-11-09 Thread Roger Pau Monne
So it can be used by both gcc and clang. Just add the Kconfig option and modify the makefiles so the llvm coverage specific code can be added in a follow up patch. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [linux-3.18 test] 115688: regressions - FAIL

2017-11-09 Thread osstest service owner
flight 115688 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/115688/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-vhd 17 guest-start/debian.repeat fail REGR. vs. 115495 Tests which are

Re: [Xen-devel] [PATCH] x86/mm: fix a potential race condition in map_pages_to_xen().

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 16:29, wrote: > In map_pages_to_xen(), a L2 page table entry may be reset to point to > a superpage, and its corresponding L1 page table need be freed in such > scenario, when these L1 page table entries are mapping to consecutive > page frames and

Re: [Xen-devel] [Qemu-devel] [PATCH v3] xen-disk: use an IOThread per instance

2017-11-09 Thread Paul Durrant
> -Original Message- > From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > Sent: 08 November 2017 17:42 > To: Paul Durrant > Cc: qemu-de...@nongnu.org; xen-de...@lists.xenproject.org; Anthony > Perard ; Kevin Wolf ; >

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

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

Re: [Xen-devel] [BUG] blkback reporting incorrect number of sectors, unable to boot

2017-11-09 Thread Roger Pau Monné
Please try to avoid top-posting. On Wed, Nov 08, 2017 at 08:27:17PM -0700, Mike Reardon wrote: > So am I correct in reading this that for at least the foreseeable future > storage using 4k sector sizes is not gonna happen? I'm just trying to > figure out if I need to get some different hardware.

Re: [Xen-devel] [PATCH] x86/mm: fix a potential race condition in map_pages_to_xen().

2017-11-09 Thread Yu Zhang
On 11/9/2017 5:19 PM, Jan Beulich wrote: On 09.11.17 at 16:29, wrote: --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4844,9 +4844,10 @@ int map_pages_to_xen( { unsigned long base_mfn; -pl1e =

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
On Thu, 2017-11-09 at 10:36 +, Sergey Dyasli wrote: > On Thu, 2017-11-09 at 03:17 -0700, Jan Beulich wrote: > > > > > On 09.11.17 at 10:54, wrote: > > > > > > On Tue, 2017-11-07 at 14:24 +, Igor Druzhinin wrote: > > > > Perhaps I should improve my diagram: > > > > > >

[Xen-devel] [PATCH 0/2 v2] xen: ACPI/SPCR based initialization of 8250 UART

2017-11-09 Thread Bhupinder Thakur
Currently, Xen supports only DT based initialization of 16550 UART. This patch set adds support for initializing 16550 UART using ACPI SPCR table. It also fixes one issue in HP Moonshot (HPE Proliant Aarch64) platform, which uses 16550 UART as a console. There is an erratum required to be

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
On Thu, 2017-11-09 at 03:05 -0700, Jan Beulich wrote: > > > > On 07.11.17 at 16:52, wrote: > > > > There is one things that I'm worrying about with this approach: > > > > At this place we just sync the idle context because we know that we > > are > > going to deal

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
On Thu, 2017-11-09 at 03:17 -0700, Jan Beulich wrote: > > > > On 09.11.17 at 10:54, wrote: > > On Tue, 2017-11-07 at 14:24 +, Igor Druzhinin wrote: > > > Perhaps I should improve my diagram: > > > > > > pCPU1: vCPUx of domain X -> migrate to pCPU2 -> switch to idle > > >

[Xen-devel] [PATCH] mini-os: add a coding style file

2017-11-09 Thread Juergen Gross
Since carving out Mini-OS from the Xen repository there hasn't been a description of the preferred coding style. Copy the Xen CODING_STYLE file. Signed-off-by: Juergen Gross --- CODING_STYLE | 109 +++ 1 file changed, 109

Re: [Xen-devel] [BUG] win2008 guest cannot get ip through sriov

2017-11-09 Thread Julien Grall
On 09/11/17 14:36, Julien Grall wrote: Hi Roger, On 09/11/17 09:27, Roger Pau Monné wrote: On Thu, Nov 09, 2017 at 12:22:49AM +, Hao, Xudong wrote: Qemu-xen didn't have commit a80363, so I report this issue to ask for sync up with qemu upstream. Last mail I mean I usually used Qemu Xen

Re: [Xen-devel] [BUG] blkback reporting incorrect number of sectors, unable to boot

2017-11-09 Thread Mike Reardon
On Thu, Nov 9, 2017 at 2:30 AM, Roger Pau Monné wrote: > Please try to avoid top-posting. > > On Wed, Nov 08, 2017 at 08:27:17PM -0700, Mike Reardon wrote: > > So am I correct in reading this that for at least the foreseeable future > > storage using 4k sector sizes is not

Re: [Xen-devel] [PATCH v2] x86/hvm: do not register hpet mmio during s3 cycle

2017-11-09 Thread Julien Grall
Hi, On 09/11/17 08:55, Jan Beulich wrote: On 08.11.17 at 20:46, wrote: Do it once at domain creation (hpet_init). Sleep -> Resume cycles will end up crashing an HVM guest with hpet as the sequence during resume takes the path: -> hvm_s3_suspend -> hpet_reset

[Xen-devel] [PATCH] VMX: sync CPU state upon vCPU destruction

2017-11-09 Thread Jan Beulich
See the code comment being added for why we need this. Reported-by: Igor Druzhinin Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -479,7 +479,13 @@ static void vmx_vcpu_destroy(struct vcpu * we

[Xen-devel] [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Boris Ostrovsky
These tables are pointed to from FADT. Adding them will result in duplicate entries in the guest's tables. Signed-off-by: Boris Ostrovsky --- Changes in v2: * Merge (pvh_acpi_table_allowed(sig) && pvh_acpi_table_in_xsdt(sig)) into a single call * Make this call

Re: [Xen-devel] [PATCH for-4.10] libevtchn: fix build on non-Linux hosts

2017-11-09 Thread Julien Grall
Hi, On 08/11/17 12:56, Wei Liu wrote: On Wed, Nov 08, 2017 at 12:52:57PM +, Roger Pau Monne wrote: Non-Linux hosts (where osdep_evtchn_restrict is not yet supported) made use of errno without including errno.h, fix this by including the header. Signed-off-by: Roger Pau Monné

Re: [Xen-devel] [PATCH] mini-os: add a coding style file

2017-11-09 Thread Wei Liu
On Thu, Nov 09, 2017 at 01:10:12PM +0100, Juergen Gross wrote: > Since carving out Mini-OS from the Xen repository there hasn't been a > description of the preferred coding style. Copy the Xen CODING_STYLE > file. > I welcome such addition. I have no opinion in actual style used though. I just

Re: [Xen-devel] [PATCH] mini-os: add a coding style file

2017-11-09 Thread Wei Liu
On Thu, Nov 09, 2017 at 01:35:49PM +0100, Juergen Gross wrote: > On 09/11/17 13:31, Wei Liu wrote: > > On Thu, Nov 09, 2017 at 01:10:12PM +0100, Juergen Gross wrote: > >> Since carving out Mini-OS from the Xen repository there hasn't been a > >> description of the preferred coding style. Copy the

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
On Thu, 2017-11-09 at 06:08 -0700, Jan Beulich wrote: > > > > On 09.11.17 at 12:01, wrote: > > > > pCPU1 > > = > > current == vCPU1 > > context_switch(next == idle) > > !! __context_switch() is skipped > > vcpu_migrate(vCPU1) > > anything_that_uses_or_touches_context() > >

Re: [Xen-devel] [PATCH] x86/mm: fix a potential race condition in map_pages_to_xen().

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 11:24, wrote: > On 11/9/2017 5:19 PM, Jan Beulich wrote: >> 2) Is your change actually enough to take care of all forms of the >> race you describe? In particular, isn't it necessary to re-check PSE >> after having taken the lock, in case another CPU

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 11:36, wrote: > Well, I'm afraid I only see two solutions: > 1) we get rid of lazy context switch; > 2) whatever it is that is happening at point c above, it needs to be >aware that we use lazy context switch, and make sure to sync the >context

Re: [Xen-devel] [PATCH 1/2 v2] xen: Add support for initializing 16550 UART using ACPI

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 12:31, wrote: > On Thu, Nov 09, 2017 at 03:49:23PM +0530, Bhupinder Thakur wrote: >> +static int ns16550_init_dt(struct ns16550 *uart, >> + const struct dt_device_node *dev) >> +{ >> +return -EINVAL; >> +} >> +#endif >> + >>

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 15:16, wrote: > Ah, yes, my bad! What if I take vcpu_migrate() out of the above exec- > trace (which is what I wanted to do in my email already)? > > pCPU1 > = > current == vCPU1 > context_switch(next == idle) > !! __context_switch() is skipped >

Re: [Xen-devel] [PATCH v3 for-next 0/4] xen: Convert __page_to_mfn and _mfn_to_page to use typesafe MFN

2017-11-09 Thread Julien Grall
Hi Jan, On 06/11/17 12:44, Jan Beulich wrote: On 06.11.17 at 13:16, wrote: On 06/11/17 12:11, Jan Beulich wrote: On 06.11.17 at 12:47, wrote: Hi Jan, On 06/11/17 11:37, Jan Beulich wrote: On 01.11.17 at 15:03,

Re: [Xen-devel] [PATCH v2] x86/hvm: do not register hpet mmio during s3 cycle

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 15:42, wrote: > Hi, > > On 09/11/17 08:55, Jan Beulich wrote: > On 08.11.17 at 20:46, wrote: >>> Do it once at domain creation (hpet_init). >>> >>> Sleep -> Resume cycles will end up crashing an HVM guest with hpet as >>>

Re: [Xen-devel] [PATCH 1/2 v2] xen: Add support for initializing 16550 UART using ACPI

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 16:07, wrote: > On Thu, Nov 09, 2017 at 06:18:21AM -0700, Jan Beulich wrote: >> >>> On 09.11.17 at 12:31, wrote: >> > On Thu, Nov 09, 2017 at 03:49:23PM +0530, Bhupinder Thakur wrote: >> >> +static int ns16550_init_dt(struct ns16550

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 12:01, wrote: > Anyway, as I was trying to explain replaying to Jan, although in this > situation the issue manifests as a consequence of vCPU migration, I > think it is indeed more general, as in, without even the need to > consider a second pCPU: > > pCPU1

Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-09 Thread Andrii Anisov
Hello Jayadev, Please see my comments inlined: On 08.11.17 07:17, Jayadev Kumaran wrote: Hello all, I'm trying to implement Xen hypervisor support on OMAP5432.I have followed the steps as in https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/OMAP5432_uEVM for the

Re: [Xen-devel] [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Roger Pau Monné
On Thu, Nov 09, 2017 at 10:37:53AM -0500, Boris Ostrovsky wrote: > These tables are pointed to from FADT. Adding them will > result in duplicate entries in the guest's tables. > > Signed-off-by: Boris Ostrovsky Reviewed-by: Roger Pau Monné

[Xen-devel] [RFC PATCH 03/31] pmstat: move pmstat.c file to the xen/drivers/pm/stat.c location

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Dmytryshyn Cpufreq driver should be more generalizable (not ACPI-specific). Thus this file should be placed to more convenient location. This is a rebased version of the original patch:

[Xen-devel] [RFC PATCH 07/31] xenpm: Clarify xenpm usage

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko CPU frequencies are in kHz. So, correct displayed text. Signed-off-by: Oleksandr Tyshchenko CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini

[Xen-devel] [RFC PATCH 11/31] xen/device-tree: Add dt_property_count_elems_of_size helper

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This is a port from Linux. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/common/device_tree.c | 20

[Xen-devel] [RFC PATCH 05/31] pmstat: make pmstat functions more generalizable

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Dmytryshyn ACPI-specific parts are moved under appropriate ifdefs. Now pmstat functions can be used in ARM platform. This is a rebased version of the original patch: https://lists.xen.org/archives/html/xen-devel/2014-11/msg00941.html

[Xen-devel] [RFC PATCH 09/31] xen/device-tree: Add dt_property_for_each_string macros

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This is a port from Linux. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/common/device_tree.c | 18

Re: [Xen-devel] [PATCH v3 for-next 0/4] xen: Convert __page_to_mfn and _mfn_to_page to use typesafe MFN

2017-11-09 Thread Julien Grall
Hi, On 09/11/17 15:36, Jan Beulich wrote: On 09.11.17 at 16:20, wrote: I had a look at the files that needs to convert. It seems there are few files with page_to_mfn/mfn_to_page re-defined but no callers: - arch/x86/mm/hap/nested_hap.c -

Re: [Xen-devel] [RFC PATCH 07/31] xenpm: Clarify xenpm usage

2017-11-09 Thread Wei Liu
On Thu, Nov 09, 2017 at 07:09:57PM +0200, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > CPU frequencies are in kHz. So, correct displayed text. > > Signed-off-by: Oleksandr Tyshchenko > CC: Ian Jackson

Re: [Xen-devel] [PATCH v3 for-next 0/4] xen: Convert __page_to_mfn and _mfn_to_page to use typesafe MFN

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 16:39, wrote: > On 09/11/17 15:36, Jan Beulich wrote: > On 09.11.17 at 16:20, wrote: >>> I had a look at the files that needs to convert. It seems there are few >>> files with page_to_mfn/mfn_to_page re-defined but no

Re: [Xen-devel] [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 16:37, wrote: > These tables are pointed to from FADT. Adding them will > result in duplicate entries in the guest's tables. > > Signed-off-by: Boris Ostrovsky Reviewed-by: Jan Beulich

Re: [Xen-devel] [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

2017-11-09 Thread Andrew Cooper
On 09/11/17 15:47, Jan Beulich wrote: On 09.11.17 at 16:37, wrote: >> These tables are pointed to from FADT. Adding them will >> result in duplicate entries in the guest's tables. >> >> Signed-off-by: Boris Ostrovsky > Reviewed-by: Jan

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 15:16, wrote: > On Thu, 2017-11-09 at 06:08 -0700, Jan Beulich wrote: >> Tasklets already take care of this by >> calling sync_local_execstate() before calling the handler. But >> for softirqs this isn't really an option; I'm surprised to see that >> tasklet

Re: [Xen-devel] [PATCH v3 for-next 0/4] xen: Convert __page_to_mfn and _mfn_to_page to use typesafe MFN

2017-11-09 Thread Jan Beulich
>>> On 09.11.17 at 16:48, wrote: > On 09/11/17 15:47, Jan Beulich wrote: > On 09.11.17 at 16:39, wrote: >>> What I meant is you would replace the 4 occurrences by >>> mfn_to_page(_mfn(...)). If you are happy with that, then fine. >> >> Oh,

Re: [Xen-devel] [BUG] blkback reporting incorrect number of sectors, unable to boot

2017-11-09 Thread Roger Pau Monné
On Thu, Nov 09, 2017 at 08:15:52AM -0700, Mike Reardon wrote: > On Thu, Nov 9, 2017 at 2:30 AM, Roger Pau Monné > wrote: > > > Please try to avoid top-posting. > > > > On Wed, Nov 08, 2017 at 08:27:17PM -0700, Mike Reardon wrote: > > > So am I correct in reading this that

[Xen-devel] [RFC PATCH 19/31] xen/arm: Introduce ARM SMC based mailbox

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This code is completely borrowed from the patch series for Linux which hasn't been upstreamed yet: [PATCH v2 0/3] mailbox: arm: introduce smc triggered mailbox https://lkml.org/lkml/2017/7/23/129 I am very excited about the idea

[Xen-devel] [RFC PATCH 23/31] xen/arm: Add Xen changes to mailbox infrastructure

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Modify the direct ported mailbox infrastructure to be functional inside Xen. Include "wrappers.h" which contains all required things the direct ported code relies on. Important note: the usage of dummy "wait-for-completion" based on

[Xen-devel] [RFC PATCH 17/31] xen/arm: Add ARM System Control and Power Interface (SCPI) protocol

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This code is completely borrowed from the Linux. Please see: http://elixir.free-electrons.com/linux/v4.14-rc6/source/drivers/firmware/arm_scpi.c http://elixir.free-electrons.com/linux/v4.14-rc6/source/include/linux/scpi_protocol.h

[Xen-devel] [RFC PATCH 18/31] xen/arm: Add mailbox infrastructure

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko The mailbox feature is used by the SCPI protocol for inter-processor communication between System Control Processor(SCP) and Application Processor(s) (AP). Existing SCPI implementation uses mailbox feature in common with shared memory

[Xen-devel] [RFC PATCH 00/31] CPUFreq on ARM

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Hi, all. The purpose of this RFC patch series is to add CPUFreq support to Xen on ARM. Motivation of hypervisor based CPUFreq is to enable one of the main PM use-cases in virtualized system powered by Xen hypervisor. Rationale behind

[Xen-devel] [RFC PATCH 10/31] xen/device-tree: Add dt_property_read_u32_index helper

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This is a port from Linux. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/common/device_tree.c | 52

[Xen-devel] [RFC PATCH 21/31] xen/arm: Add rxdone_auto flag to mbox_controller structure

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch adds a flag which indicates if mailbox controller doesn't need to poll for received data. It either has RX done irq for signaling when received data are ready or received data 'appears' right after transmitted data has been

[Xen-devel] [RFC PATCH 16/31] arm: add SMC wrapper that is compatible with SMCCC

2017-11-09 Thread Oleksandr Tyshchenko
From: Volodymyr Babchuk Existing SMC wrapper call_smc() allows only 4 parameters and returns only one value. This is enough for existing use in PSCI code, but TEE mediator will need a call that is fully compatible with ARM SMCCC. This patch adds this call for both

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

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Dmytryshyn First implementation of the cpufreq driver has been written with x86 in mind. This patch makes possible the cpufreq driver be working on both x86 and arm architectures. This is a rebased version of the original patch:

[Xen-devel] [RFC PATCH 20/31] xen/arm: Add common header file wrappers.h

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This header file is intended to keep various Linux2Xen wrappers, define-s, stubs which used by all direct ported CPUfreq components. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini

[Xen-devel] [RFC PATCH 28/31] xen/arm: Introduce SCPI based CPUFreq driver

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch adds a CPUFreq driver for controlling CPUs DVFS feature provided by System Control Processor (SCP) using SCPI protocol for inter-processor communication. The important point is that unlike Linux Xen doesn't have clock

[Xen-devel] [RFC PATCH 29/31] xen/arm: Introduce CPUFreq Interface component

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch adds an interface component which performs following steps: 1. Initialize everything needed SCPI based CPUFreq driver to be functional (SCPI Message protocol, mailbox to communicate with SCP, etc). Also preliminary check

[Xen-devel] [RFC PATCH 27/31] cpufreq: hack: perf->states isn't a real guest handle on ARM

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch is just a temp solution to highlight a problem which should be resolved in a proper way. set_px_pminfo() is intended to be called from platform hypercall where "perf" argument was entirely filled in by hwdom. But unlike x86

[Xen-devel] [RFC PATCH 24/31] xen/arm: Add Xen changes to ARM SMC based mailbox

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Modify the direct ported ARM SMC based mailbox to be functional inside Xen. Include "wrappers.h" which contains all required things the direct ported code relies on. Signed-off-by: Oleksandr Tyshchenko

[Xen-devel] [RFC PATCH 22/31] xen/arm: Add Xen changes to SCPI protocol

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Modify the direct ported SCPI Message Protocol driver to be functional inside Xen. As SCPI Message protocol driver expects mailbox to be registed, find and initialize mailbox before probing it. Include "wrappers.h" which contains all

[Xen-devel] [RFC PATCH 01/31] cpufreq: move cpufreq.h file to the xen/include/xen location

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Dmytryshyn Cpufreq driver should be more generalizable (not ACPI-specific). Thus this file should be placed to more convenient location. This is a rebased version of the original patch:

[Xen-devel] [RFC PATCH 02/31] pm: move processor_perf.h file to the xen/include/xen location

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Dmytryshyn Cpufreq driver should be more generalizable (not ACPI-specific). Thus this file should be placed to more convenient location. This is a rebased version of the original patch:

[Xen-devel] [RFC PATCH 14/31] xen/arm: Add DEVICE_MAILBOX device class

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/include/asm-arm/device.h | 1 + 1 file changed, 1 insertion(+) diff

[Xen-devel] [RFC PATCH 13/31] xen/arm: Add driver_data field to struct device

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/include/asm-arm/device.h | 1 + 1 file changed, 1 insertion(+) diff

[Xen-devel] [RFC PATCH 26/31] xen/arm: Don't set txdone_poll flag for ARM SMC mailbox

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Don't set txdone_poll flag resulting in TXDONE_BY_POLL method. It is not optimal to use this method along with the dummy last_tx_done(), since the controller is completely synchronous. What is more the TXDONE_BY_POLL method is prohibited

[Xen-devel] [RFC PATCH 25/31] xen/arm: Use non-blocking mode for SCPI protocol

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Don't block until data is transmitted. As we are limited to use only two methods TXDONE_BY_IRQ and TXDONE_BY_ACK, there are two possible scenario: - If the mailbox controller has TX-done irq it definitely knows when transmitted data has

[Xen-devel] [RFC PATCH 12/31] xen/device-tree: Add dt_property_read_string_helper and friends

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This is a port from Linux. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/common/device_tree.c | 27

[Xen-devel] [RFC PATCH 15/31] xen/arm: Store device-tree node per cpu

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/arch/arm/smpboot.c| 5 + xen/include/xen/device_tree.h | 2

[Xen-devel] [RFC PATCH 30/31] xen/arm: Build CPUFreq components

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/arch/arm/Makefile | 1 + xen/arch/arm/cpufreq/Makefile | 5

[Xen-devel] [RFC PATCH 04/31] cpufreq: make turbo settings to be configurable

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Dmytryshyn This settings is not needed for some architectures. So make it to be configurable and use it for x86 architecture. This is a rebased version of the original patch:

[Xen-devel] [RFC PATCH 08/31] xen/device-tree: Add dt_count_phandle_with_args helper

2017-11-09 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Port Linux helper of_count_phandle_with_args for counting number of phandles in a property. Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Julien Grall --- Changes in v1:

  1   2   >