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 PGC_broken flag of > that page. Dur

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 @@ Description: >>> #echo 00:19.0-

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 { > + struct pci_dev *de

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 > -> hpet_init > -> register_mm

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) > +{ > +/* > + * DSDT and FACS 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: > --- 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 ( locking ) >

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 having the same mapping flags.

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 bac

[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 build-armh

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] [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 ; > Stefano Stabellini ; Max Reitz > Subject: Re: [Qemu-devel] [PATCH v3] x

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 > Subject: Re: [Xen-devel] [BUG] blkback reporting incorrec

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 thi

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 softirqs) in which we are accessing

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 +++-- > 1 file changed, 15 in

[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

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) -> >> vmx_vcpu_disable_pml() -

[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 implemen

[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 register

[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 --- TBD: There was on

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 > > > context > > > ->

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 with VMCS later. But what about

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 > > > context > > > -> RCU

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 > > t

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 = l2e_to_l1e(*pl2e); if ( lo

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 mapping to consecutive page frames

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: > > > > > > > > pCPU1: vCPUx of

[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 Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - New in this version. --- xen/Kconfig.debug| 46

[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, toget

[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 Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - s/gmake/make/. - Fix gcov section to mention CONFIG_COVERAGE instead of CONFIG_GCOV.

[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 l

[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 Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan --- Changes since v1: - Use c

[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 Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - Rename

[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 Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan

[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 Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stef

[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: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - Constify cov_ops. - Introd

[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 Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk

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 > > Perard ; Kevin Wolf ;

[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 test-amd64-amd64-xl-

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 b

[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 insertions(+) cre

[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 fai

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 wa

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

2017-11-09 Thread Juergen Gross
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 Xen CODING_STYLE >> file. >> > > I welcome such addition. I have no opi

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 X

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 has just finished >> doing t

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 before playing with or a

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 > = > current =

[Xen-devel] Xen Nested Virtualization for HyperPlatform

2017-11-09 Thread Kangjie Xi
Hi, I am researching HyperPlatform(https://github.com/tandasat/HyperPlatform) recently, it is a thin hypervisor based on Intel VT-x and EPT technology, it can't create a new virtual machine but just turns the already running Windows OS into its guest VM. HyperPlatform works very well in VMware VM

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 >> + >> +#ifdef CONFIG_ACPI >> +

[Xen-devel] [PATCH v2 1/5] x86: merge x86_hyper into x86_platform and x86_init

2017-11-09 Thread Juergen Gross
Instead of x86_hyper being either NULL on bare metal or a pointer to a struct hypervisor_x86 in case of the kernel running as a guest merge the struct into x86_platform and x86_init. This will remove the need for wrappers making it hard to find out what is being called. With dummy functions added

[Xen-devel] [PATCH v2 0/5] x86/xen: support booting PVH guest via standard boot path

2017-11-09 Thread Juergen Gross
Booting a Xen PVH guest requires a special boot entry as it is mandatory to setup some Xen-specific interfaces rather early. When grub or OVMF are used as boot loaders, however, those will fill the boot parameters in zeropage and there is no longer a need to do something PVH specific in the early b

[Xen-devel] [PATCH v2 5/5] x86/xen: use guest_late_init to detect Xen PVH guest

2017-11-09 Thread Juergen Gross
In case we are booted via the default boot entry by a generic loader like grub or OVMF it is necessary to distinguish between a HVM guest with a device model supporting legacy devices and a PVH guest without device model. PVH guests will always have x86_platform.legacy.no_vga set and x86_platform.

[Xen-devel] [PATCH v2 2/5] x86: add enum for hypervisors to replace x86_hyper

2017-11-09 Thread Juergen Gross
The x86_hyper pointer is only used for checking whether a virtual device is supporting the hypervisor the system is running on. Use an enum for that purpose instead and drop the x86_hyper pointer. Cc: k...@microsoft.com Cc: haiya...@microsoft.com Cc: sthem...@microsoft.com Cc: akata...@vmware.com

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() > > > > So, it must be

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

2017-11-09 Thread Julien Grall
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 tree to do test, and found out this issue.

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 tre

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 > anything_that_uses_or_touch

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 -> hpet_deinit -> hpe

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é Acked-by: W

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 >>> the sequence during resume takes the path: >>> -> h

[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 should disable PML manually here. Note that vm

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 initi

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

2017-11-09 Thread Dario Faggioli
On Thu, 2017-11-09 at 07:49 -0700, Jan Beulich wrote: > See the code comment being added for why we need this. > > Reported-by: Igor Druzhinin > Signed-off-by: Jan Beulich > Reviewed-by: Dario Faggioli Regards, Dario -- <> (Raistlin Majere) ---

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 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 *uart, > >> + const struct dt_device_node *dev) > >> +{ >

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 gonna happen? I'm just

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, wrote: Most of the users of page_to_mfn and mfn_to_page are either overrid

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 *uart, >> >> + cons

[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 return a boolean expression as op

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: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 > - arch/x86/mm/p2m-pt.c > - arch/x86/pv/traps.c > - arch/x86/pv/mm.c

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 - arch/x86/mm/p2m-pt.c - arch/x86/

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 callers: >>> - arch/x86/mm/hap/nested_hap.c >>>

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 ___ Xen-devel mailing list Xen-devel@lists.

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 09/11/17 15:47, Jan Beulich wrote: 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 callers: - arch/

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 Beulich > > Pulled into x86-next, thanks. ~Andrew __

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, sure, that's a fine intermediate state, which we hav

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 code does this indep

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é Thanks, roger. __

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 for at least the foresee

[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: https://lists.xen.org/archives/html/xen-devel/2014-11/msg00935.html Signed-off-by: Oleksandr

[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 CC: Julien Grall --- tools/misc/xenpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/

[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/include/xen/device_tree.h | 15 +++ 2 files changed, 35 insertions(+) diff --git a/x

[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 Signed-off-by: Oleksandr Dmytryshyn Signed-o

[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 ++ xen/include/xen/device_tree.h | 21 + 2 files changed, 39 insertions(+) diff --git

[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 required things the direct ported

[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: https://lists.xen.org/archives/html/xen-devel/2014-11/msg00938.html Signed-off-by: Oleksandr

[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: https://lists.xen.org/archives/html/xen-devel/2014-11/msg00934.html Signed-off-by: Oleksandr

[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 --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h index 3e2f34a..e8ce338 100644 --- a/xen/inclu

[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/include/xen/device_tree.h | 20 + 2 files changed, 72 inse

[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 sent (synchronous case). The purpo

[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 arm32 and arm64. There was simi

[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: https://lists.xen.org/archives/html/xen-devel/2014-

[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 CC: Julien Grall --- xen/arch/arm/cpufreq/wrappers.h | 239 ++

[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 infrastructure and clocks for the CPUs (

[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 if SCPI DVFS clock nodes offered

[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 we don't get this info from hwdom

[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 CC: Stefano Stabellini CC: Julien Grall CC: Andre Przywara ---

[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 + 2 files changed, 6 insertions(+) create mode 100644 xen/arch/arm/cpufreq/Makefile diff --git a/xen/arch/ar

[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: https://lists.xen.org/archives/html/xen-devel/2014-11/msg00942.html Signed-off-by: Oleksandr Dmytryshyn

[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: - Add Julien's reviewed-by Changes in v2: - --- xen/common/device_tree.c

  1   2   >