Re: [Xen-devel] [PATCH] x86/pv: Drop redundant CONFIG_PV ifdefary

2019-04-04 Thread Wei Liu
On Wed, Apr 03, 2019 at 07:56:18PM +0100, Andrew Cooper wrote: > These were made redundant by c/s 23058e7b3 "x86/shadow: put PV L1TF functions > under CONFIG_PV" but makes the code read as if outside of the ifdef. > > Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu

Re: [Xen-devel] [PATCH 1/4] x86: suppress XPTI-related TLB flushes when possible

2019-04-04 Thread Jan Beulich
>>> On 03.04.19 at 20:52, wrote: > On 13/03/2019 12:38, Jan Beulich wrote: >> When there's no XPTI-enabled PV domain at all, there's no need to issue >> respective TLB flushes. Hardwire opt_xpti_* to false when !PV, and >> record the creation of PV domains by bumping opt_xpti_* accordingly. >> >>

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Jan Beulich
>>> On 03.04.19 at 18:16, wrote: > On Wed, Apr 3, 2019 at 10:06 AM Jan Beulich wrote: >> Then I still don't see why you would want to force propagation >> in these cases: If it's generally demand-populate, it can't be right >> to _fully_ populate that slot. You ought to be setting the access >>

[Xen-devel] [linux-4.14 test] 134289: regressions - trouble: blocked/broken/fail/pass

2019-04-04 Thread osstest service owner
flight 134289 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134289/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvopsbroken build-arm64

Re: [Xen-devel] [PATCH 4/4] x86/PV: remove unnecessary toggle_guest_pt() overhead

2019-04-04 Thread Jan Beulich
>>> On 03.04.19 at 20:32, wrote: > On 13/03/2019 12:39, Jan Beulich wrote: >> While the mere updating of ->pv_cr3 and ->root_pgt_changed aren't overly >> expensive (but still needed only for the toggle_guest_mode() path), the >> effect of the latter on the exit-to-guest path is not insignificant.

Re: [Xen-devel] [PATCH] amd-iommu: Fix Guest CR3 Table following c/s 3a7947b6901

2019-04-04 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 03 April 2019 19:08 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Wei Liu > ; Roger Pau Monne ; Brian Woods > ; Paul > Durrant > Subject: [PATCH] amd-iommu: Fix Guest CR3 Table following c/s

[Xen-devel] [PATCH 0/3] automation: add Fedora image and build jobs

2019-04-04 Thread Wei Liu
Wei Liu (3): automation: add a Fedora image automation: add Fedora image to containerize script gitlab-ci: add fedora gcc build jobs automation/build/fedora/latest.dockerfile | 43 +++ automation/gitlab-ci/build.yaml | 10 ++

[Xen-devel] [PATCH 1/3] automation: add a Fedora image

2019-04-04 Thread Wei Liu
Use the latest and greatest. Signed-off-by: Wei Liu --- automation/build/fedora/latest.dockerfile | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 automation/build/fedora/latest.dockerfile diff --git a/automation/build/fedora/latest.dockerfile

[Xen-devel] [PATCH 2/3] automation: add Fedora image to containerize script

2019-04-04 Thread Wei Liu
At the same time sort the list alphabetically. Signed-off-by: Wei Liu --- automation/scripts/containerize | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 01c44da93c..a7809b3010 100755 ---

[Xen-devel] [PATCH 3/3] gitlab-ci: add fedora gcc build jobs

2019-04-04 Thread Wei Liu
Although the image comes with clang, clang builds don't work yet. Signed-off-by: Wei Liu --- automation/gitlab-ci/build.yaml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index c29a76e9ff..dd5722a5bb 100644 ---

Re: [Xen-devel] [PATCH] ALSA: xen-front: Do not use stream buffer size before it is set

2019-04-04 Thread Takashi Iwai
On Thu, 04 Apr 2019 14:42:44 +0200, Juergen Gross wrote: > > On 04/04/2019 14:38, Oleksandr Andrushchenko wrote: > > From: Oleksandr Andrushchenko > > > > This fixes the regression introduced while moving to Xen shared > > buffer implementation. > > > > Fixes: 58f9d806d16a ("ALSA: xen-front:

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Razvan Cojocaru
On 4/3/19 6:30 PM, Jan Beulich wrote: On 03.04.19 at 17:17, wrote: On 4/3/19 5:58 PM, Jan Beulich wrote: On 03.04.19 at 16:29, wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -3011,8 +3011,16 @@ int p2m_set_suppress_ve(struct domain *d, gfn_t gfn, bool suppress_ve,

Re: [Xen-devel] [PATCH v4 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-04-04 Thread Dario Faggioli
On Tue, 2019-04-02 at 18:19 +0200, Juergen Gross wrote: > cpu_disable_scheduler() is being called from __cpu_disable() today. > There is no need to execute it on the cpu just being disabled, so use > the CPU_DEAD case of the cpu notifier chain. Moving the call out of > stop_machine() context is

Re: [Xen-devel] [PATCH 3/3] gitlab-ci: add fedora gcc build jobs

2019-04-04 Thread Doug Goldstein
On Thu, Apr 04, 2019 at 12:23:02PM +0100, Wei Liu wrote: > Although the image comes with clang, clang builds don't work yet. > > Signed-off-by: Wei Liu Acked-by: Doug Goldstein ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH] amd-iommu: Fix Guest CR3 Table following c/s 3a7947b6901

2019-04-04 Thread Andrew Cooper
On 04/04/2019 11:39, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 03 April 2019 19:08 >> To: Xen-devel >> Cc: Andrew Cooper ; Jan Beulich >> ; Wei Liu >> ; Roger Pau Monne ; Brian Woods >> ; Paul >> Durrant >> Subject:

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Andrew Cooper
On 04/04/2019 13:46, Razvan Cojocaru wrote: > On 4/3/19 6:30 PM, Jan Beulich wrote: > On 03.04.19 at 17:17, wrote: >>> On 4/3/19 5:58 PM, Jan Beulich wrote: >>> On 03.04.19 at 16:29, wrote: > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -3011,8 +3011,16 @@

Re: [Xen-devel] [PATCH 2/2] docs/hypervisor-guide: Code Coverage

2019-04-04 Thread Julien Grall
Hi, On 04/04/2019 13:46, Andrew Cooper wrote: On 04/04/2019 13:29, Julien Grall wrote: On 04/04/2019 13:07, Artem Mygaiev wrote: Hello Andrew Hi, Minor note below. On Wed, 2019-04-03 at 16:00 +0100, Andrew Cooper wrote: [snip] + For ARM builds, while Xen will compile with

Re: [Xen-devel] [PATCH] amd-iommu: Fix Guest CR3 Table following c/s 3a7947b6901

2019-04-04 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 04 April 2019 11:46 > To: Paul Durrant ; Xen-devel > > Cc: Jan Beulich ; Wei Liu ; Roger Pau > Monne > ; Brian Woods > Subject: Re: [PATCH] amd-iommu: Fix Guest CR3 Table following c/s 3a7947b6901 > > On 04/04/2019 11:39, Paul Durrant

Re: [Xen-devel] [PATCH] amd-iommu: Fix Guest CR3 Table following c/s 3a7947b6901

2019-04-04 Thread Jan Beulich
>>> On 03.04.19 at 20:08, wrote: > +static uint64_t dte_get_gcr3_table(const struct amd_iommu_dte *dte) > { > return ((dte->gcr3_trp_51_31 << 31) | (dte->gcr3_trp_30_15 << 15) | I'm afraid there's another bug here: gcc, in its default mode at least, doesn't promote bit field values to

[Xen-devel] [PATCH v3] public/io/blkif.h: try to fix the semantics of sector based quantities

2019-04-04 Thread Paul Durrant
The semantics of sector based quantities, such as first_sect and last_sect in blkif_request_segment, and the value of "sectors" in the backend info in xenstore have become confused. Some comments in the header suggest they should be supplied/interpreted strictly in terms of 512-byte units, others

[Xen-devel] [linux-3.18 bisection] complete test-amd64-amd64-xl-multivcpu

2019-04-04 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-xl-multivcpu testid xen-boot Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu

Re: [Xen-devel] [PATCH 1/2] docs/sphinx: Introduce a hypervisor guide section

2019-04-04 Thread Wei Liu
On Wed, Apr 03, 2019 at 03:59:59PM +0100, Andrew Cooper wrote: > Include (and retrofit to the user guide) an introductory paragraph describing > the intended audience. > > Signed-off-by: Andrew Cooper Acked-by: Wei Liu ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH 2/2] docs/hypervisor-guide: Code Coverage

2019-04-04 Thread Wei Liu
On Wed, Apr 03, 2019 at 04:00:00PM +0100, Andrew Cooper wrote: > During a discussion in person, it was identified that Coverage doesn't > currently work for ARM yet. Also, there are a number of errors with the > existing coverage document. > > Take the opportunity to rewrite it in RST, making it

[Xen-devel] [PATCH] ALSA: xen-front: Do not use stream buffer size before it is set

2019-04-04 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko This fixes the regression introduced while moving to Xen shared buffer implementation. Fixes: 58f9d806d16a ("ALSA: xen-front: Use Xen common shared buffer implementation") Signed-off-by: Oleksandr Andrushchenko --- sound/xen/xen_snd_front_alsa.c | 2 +- 1 file

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Razvan Cojocaru
On 4/4/19 3:46 PM, Razvan Cojocaru wrote: On 4/3/19 6:30 PM, Jan Beulich wrote: On 03.04.19 at 17:17, wrote: On 4/3/19 5:58 PM, Jan Beulich wrote: On 03.04.19 at 16:29, wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -3011,8 +3011,16 @@ int p2m_set_suppress_ve(struct

Re: [Xen-devel] [PATCH] build: don't mandate availability of a fetcher program

2019-04-04 Thread Wei Liu
On Thu, Mar 14, 2019 at 02:08:47PM +, Wei Liu wrote: > It is common that build hosts are isolated from outside world. They > don't necessarily have wget or ftp installed. > > Turn the error into warning in configure. And point FETCHER to `false' > command if neither wget nor ftp is available,

[Xen-devel] [distros-debian-wheezy test] 83868: trouble: blocked/broken

2019-04-04 Thread Platform Team regression test user
flight 83868 distros-debian-wheezy real [real] http://osstest.xensource.com/osstest/logs/83868/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-i386

[Xen-devel] [xen-4.12-testing test] 134291: trouble: blocked/broken/fail/pass

2019-04-04 Thread osstest service owner
flight 134291 xen-4.12-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/134291/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken

Re: [Xen-devel] [PATCH] x86/pv: Drop redundant CONFIG_PV ifdefary

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 10:25, wrote: > On Wed, Apr 03, 2019 at 07:56:18PM +0100, Andrew Cooper wrote: >> These were made redundant by c/s 23058e7b3 "x86/shadow: put PV L1TF functions >> under CONFIG_PV" but makes the code read as if outside of the ifdef. >> >> Signed-off-by: Andrew Cooper > >

Re: [Xen-devel] [PATCH 2/2] docs/hypervisor-guide: Code Coverage

2019-04-04 Thread Julien Grall
On 04/04/2019 13:07, Artem Mygaiev wrote: > Hello Andrew Hi, > Minor note below. > > On Wed, 2019-04-03 at 16:00 +0100, Andrew Cooper wrote: > > [snip] > >> + For ARM builds, while Xen will compile with ``CONFIG_COVERAGE`` >> enabled, the >> + resulting binary will not successfully boot

Re: [Xen-devel] [PATCH v3] public/io/blkif.h: try to fix the semantics of sector based quantities

2019-04-04 Thread Wei Liu
On Thu, Apr 04, 2019 at 12:40:02PM +0100, Paul Durrant wrote: > The semantics of sector based quantities, such as first_sect and last_sect > in blkif_request_segment, and the value of "sectors" in the backend info > in xenstore have become confused. Some comments in the header suggest they >

Re: [Xen-devel] [PATCH] ALSA: xen-front: Do not use stream buffer size before it is set

2019-04-04 Thread Juergen Gross
On 04/04/2019 14:38, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > This fixes the regression introduced while moving to Xen shared > buffer implementation. > > Fixes: 58f9d806d16a ("ALSA: xen-front: Use Xen common shared buffer > implementation") > > Signed-off-by:

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Jan Beulich
>>> On 03.04.19 at 19:41, wrote: > On 4/3/19 7:04 PM, Jan Beulich wrote: > On 03.04.19 at 17:48, wrote: >>> On 4/3/19 6:30 PM, Jan Beulich wrote: >>> On 03.04.19 at 17:17, wrote: > Changes to the hostp2m (also known as altp2m view 0) propagate to all > existing altp2ms, but they

Re: [Xen-devel] [PATCH 2/2] docs/hypervisor-guide: Code Coverage

2019-04-04 Thread Artem Mygaiev
Hello Andrew Minor note below. On Wed, 2019-04-03 at 16:00 +0100, Andrew Cooper wrote: [snip] > + For ARM builds, while Xen will compile with ``CONFIG_COVERAGE`` > enabled, the > + resulting binary will not successfully boot if it exceeds 2MB in > size. > + Xen's early memory management

Re: [Xen-devel] [PATCH] ALSA: xen-front: Do not use stream buffer size before it is set

2019-04-04 Thread Oleksandr Andrushchenko
On 4/4/19 3:45 PM, Takashi Iwai wrote: On Thu, 04 Apr 2019 14:42:44 +0200, Juergen Gross wrote: On 04/04/2019 14:38, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko This fixes the regression introduced while moving to Xen shared buffer implementation. Fixes: 58f9d806d16a

Re: [Xen-devel] [PATCH 2/2] docs/hypervisor-guide: Code Coverage

2019-04-04 Thread Andrew Cooper
On 04/04/2019 13:29, Julien Grall wrote: > > On 04/04/2019 13:07, Artem Mygaiev wrote: >> Hello Andrew > Hi, > >> Minor note below. >> >> On Wed, 2019-04-03 at 16:00 +0100, Andrew Cooper wrote: >> >> [snip] >> >>> + For ARM builds, while Xen will compile with ``CONFIG_COVERAGE`` >>> enabled, the

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Tamas K Lengyel
On Thu, Apr 4, 2019 at 6:50 AM Razvan Cojocaru wrote: > > On 4/4/19 3:46 PM, Razvan Cojocaru wrote: > > On 4/3/19 6:30 PM, Jan Beulich wrote: > > On 03.04.19 at 17:17, wrote: > >>> On 4/3/19 5:58 PM, Jan Beulich wrote: > >>> On 03.04.19 at 16:29, wrote: > > ---

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Tamas K Lengyel
On Thu, Apr 4, 2019 at 6:49 AM Andrew Cooper wrote: > > On 04/04/2019 13:46, Razvan Cojocaru wrote: > > On 4/3/19 6:30 PM, Jan Beulich wrote: > > On 03.04.19 at 17:17, wrote: > >>> On 4/3/19 5:58 PM, Jan Beulich wrote: > >>> On 03.04.19 at 16:29, wrote: > > ---

Re: [Xen-devel] [PATCH] build: don't mandate availability of a fetcher program

2019-04-04 Thread Andrew Cooper
On 04/04/2019 14:13, Wei Liu wrote: > On Thu, Mar 14, 2019 at 02:08:47PM +, Wei Liu wrote: >> It is common that build hosts are isolated from outside world. They >> don't necessarily have wget or ftp installed. >> >> Turn the error into warning in configure. And point FETCHER to `false' >>

Re: [Xen-devel] [PATCH v2 1/2] xen: add interface for obtaining .config from hypervisor

2019-04-04 Thread Wei Liu
On Fri, Mar 15, 2019 at 05:29:28PM +0100, Juergen Gross wrote: > On 15/03/2019 16:55, Andrew Cooper wrote: > > On 14/03/2019 11:59, Juergen Gross wrote: > >> @@ -1100,6 +1100,20 @@ typedef struct xen_sysctl_cpu_policy > >> xen_sysctl_cpu_policy_t; > >>

Re: [Xen-devel] [PATCH 2/3] x86/sysctl: Clean up XEN_SYSCTL_cpu_hotplug

2019-04-04 Thread Andrew Cooper
On 03/04/2019 10:38, Jan Beulich wrote: On 03.04.19 at 11:06, wrote: >> On 03/04/2019 09:53, Jan Beulich wrote: >> On 02.04.19 at 21:57, wrote: --- a/xen/arch/x86/sysctl.c +++ b/xen/arch/x86/sysctl.c @@ -137,27 +137,35 @@ long arch_do_sysctl( case

[Xen-devel] [PATCH v5 04/15] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU

2019-04-04 Thread Pu Wen
As Hygon Dhyana CPU share similar PMU architecture with AMD family 17h one, so add Hygon Dhyana support in vpmu_arch_initialise() and vpmu_init() by sharing AMD code path. Split the common part in amd_vpmu_init() to a static function _vpmu_init(), making AMD and Hygon to call the shared function

[Xen-devel] [PATCH v5 06/15] x86/spec_ctrl: Add Hygon Dhyana to the respective mitigation machinery

2019-04-04 Thread Pu Wen
The Hygon Dhyana CPU has the same speculative execution as AMD family 17h, so share AMD Retpoline and PTI mitigation code with Hygon Dhyana. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/spec_ctrl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[Xen-devel] [PATCH v5 05/15] x86/cpu/mce: Add Hygon Dhyana support to the MCA infrastructure

2019-04-04 Thread Pu Wen
The machine check architecture for Hygon Dhyana CPU is similar to the AMD family 17h one. Add vendor checking for Hygon Dhyana to share the code path of AMD family 17h. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/cpu/common.c | 3 ++-

[Xen-devel] [PATCH v5 02/15] x86/cpu: Fix common cpuid faulting probing for AMD and Hygon

2019-04-04 Thread Pu Wen
There is no MSR_INTEL_PLATFORM_INFO for AMD and Hygon families. Read this MSR will stop the Xen initialization process in some Hygon systems or produce GPF(0). So directly return false in the function probe_cpuid_faulting() if !cpu_has_hypervisor. Signed-off-by: Pu Wen Acked-by: Jan Beulich ---

Re: [Xen-devel] [PATCH v5 00/15] Add support for Hygon Dhyana Family 18h processor

2019-04-04 Thread Julien Grall
Hi, I am not sure why I end up to be CCed on the cover letter when I am not CCed on the rest of series. Cheers, On 04/04/2019 14:44, Pu Wen wrote: As a new x86 CPU vendor, Chengdu Haiguang IC Design Co., Ltd (Hygon) is a joint venture between AMD and Haiguang Information Technology Co.,

Re: [Xen-devel] [PATCH RFC] x86/cpu: fix vendor string for Shanghai CPU

2019-04-04 Thread Wei Liu
On Thu, Apr 04, 2019 at 03:18:49PM +0100, Andrew Cooper wrote: > On 04/04/2019 15:11, Wei Liu wrote: > > Signed-off-by: Wei Liu > > Sadly not.  This is a char[8] field (so loses the \0 terminator), which > then gets passed to %s > > I've got an overhaul to this area of code in the works, and am

Re: [Xen-devel] [PATCH] MAINTAINERS: Move xen/lib/x86 under x86 maintainership

2019-04-04 Thread Julien Grall
Hi, On 04/04/2019 15:19, Jan Beulich wrote: On 04.04.19 at 16:04, wrote: At the moment, xen/lib/x86 is covered by the "REST". However, this is x86-only, so this can fall under the x86 maintainership. Signed-off-by: Julien Grall Acked-by: Jan Beulich Thanks for noticing. Would you mind

Re: [Xen-devel] [PATCH RFC] x86/cpu: fix vendor string for Shanghai CPU

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 16:11, wrote: > --- a/xen/arch/x86/cpu/shanghai.c > +++ b/xen/arch/x86/cpu/shanghai.c > @@ -16,7 +16,7 @@ static void init_shanghai(struct cpuinfo_x86 *c) > } > > static const struct cpu_dev shanghai_cpu_dev = { > -.c_vendor = " Shang", > +.c_vendor =

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 15:09, wrote: > I agree that it is confusing. It would be fine to UNSHARE here as well > to keep things consistent but otherwise it's not really an issue as > the entry type is checked later to ensure that this is a p2m_ram_rw > entry. We are simply trying to keep mem_sharing

[Xen-devel] [xen-unstable-smoke test] 134375: trouble: blocked/broken/pass

2019-04-04 Thread osstest service owner
flight 134375 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134375/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Tamas K Lengyel
On Thu, Apr 4, 2019 at 8:36 AM Jan Beulich wrote: > > >>> On 04.04.19 at 15:09, wrote: > > I agree that it is confusing. It would be fine to UNSHARE here as well > > to keep things consistent but otherwise it's not really an issue as > > the entry type is checked later to ensure that this is a

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 16:43, wrote: > On Thu, Apr 4, 2019 at 8:36 AM Jan Beulich wrote: >> >> >>> On 04.04.19 at 15:09, wrote: >> > I agree that it is confusing. It would be fine to UNSHARE here as well >> > to keep things consistent but otherwise it's not really an issue as >> > the entry type is

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Tamas K Lengyel
On Thu, Apr 4, 2019 at 8:51 AM Jan Beulich wrote: > > >>> On 04.04.19 at 16:43, wrote: > > On Thu, Apr 4, 2019 at 8:36 AM Jan Beulich wrote: > >> > >> >>> On 04.04.19 at 15:09, wrote: > >> > I agree that it is confusing. It would be fine to UNSHARE here as well > >> > to keep things consistent

[Xen-devel] [PATCH] xen: Prevent buffer overflow in privcmd ioctl

2019-04-04 Thread Dan Carpenter
The "call" variable comes from the user in privcmd_ioctl_hypercall(). It's an offset into the hypercall_page[] which has (PAGE_SIZE / 32) elements. We need to put an upper bound on it to prevent an out of bounds access. Fixes: 1246ae0bb992 ("xen: add variable hypercall caller") Signed-off-by:

[Xen-devel] [PATCH v5 03/15] x86/cpu/mtrr: Add Hygon Dhyana support to get TOP_MEM2

2019-04-04 Thread Pu Wen
The Hygon Dhyana CPU supports the MSR way to get TOP_MEM2. So add Hygon Dhyana support to print the value of TOP_MEM2. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/cpu/mtrr/generic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[Xen-devel] [PATCH v5 00/15] Add support for Hygon Dhyana Family 18h processor

2019-04-04 Thread Pu Wen
As a new x86 CPU vendor, Chengdu Haiguang IC Design Co., Ltd (Hygon) is a joint venture between AMD and Haiguang Information Technology Co., Ltd., aims at providing high performance x86 processors for China server market. The first generation Hygon processor(Dhyana) originates from AMD technology

Re: [Xen-devel] [PATCH v5 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-04 Thread Andrew Cooper
On 04/04/2019 14:45, Pu Wen wrote: > index 774ceac..75fefcf 100644 > --- a/xen/include/asm-x86/x86-vendors.h > +++ b/xen/include/asm-x86/x86-vendors.h > @@ -30,6 +30,11 @@ > #define X86_VENDOR_SHANGHAI_ECX 0x20206961U > #define X86_VENDOR_SHANGHAI_EDX 0x68676e61U > > -#define X86_VENDOR_NUM 5

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 14:50, wrote: > On 4/4/19 3:46 PM, Razvan Cojocaru wrote: >> Before going into that, are we now certain that ALLOC is sufficient? I >> believe it should be for _our_ use-cases, but we don't want to break >> anyone's code. Maybe Tamas knows more about this. > > Sorry, I

Re: [Xen-devel] [PATCH RFC] x86/cpu: fix vendor string for Shanghai CPU

2019-04-04 Thread Andrew Cooper
On 04/04/2019 15:19, Wei Liu wrote: > On Thu, Apr 04, 2019 at 03:18:49PM +0100, Andrew Cooper wrote: >> On 04/04/2019 15:11, Wei Liu wrote: >>> Signed-off-by: Wei Liu >> Sadly not.  This is a char[8] field (so loses the \0 terminator), which >> then gets passed to %s >> >> I've got an overhaul to

Re: [Xen-devel] [PATCH] x86/vmx: Fixup removals from MSR load-lists

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 16:42, wrote: > Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context") > introduced a regression on Harpertown and earlier cores (Gen 1 VT-x) > where as soon as guest EFER becomes equal to Xen EFER > (almost any 64-bit VM) stale version of EFER is incorrectly >

[Xen-devel] [PATCH v5 15/15] tools/libxc: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
Add Hygon Dhyana support to caculate the cpuid policies for creating PV or HVM guest by using the code path of AMD. Signed-off-by: Pu Wen --- tools/libxc/xc_cpuid_x86.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c

[Xen-devel] [PATCH RFC] x86/cpu: fix vendor string for Shanghai CPU

2019-04-04 Thread Wei Liu
Signed-off-by: Wei Liu --- Cc: DavidWang Or perhaps it should have been Zhaoxin? --- xen/arch/x86/cpu/shanghai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/shanghai.c b/xen/arch/x86/cpu/shanghai.c index 24af5c8259..36c1763c81 100644 ---

Re: [Xen-devel] [PATCH] MAINTAINERS: Move xen/lib/x86 under x86 maintainership

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 16:20, wrote: > On 04/04/2019 15:19, Jan Beulich wrote: > On 04.04.19 at 16:04, wrote: >>> At the moment, xen/lib/x86 is covered by the "REST". However, this is >>> x86-only, so this can fall under the x86 maintainership. >>> >>> Signed-off-by: Julien Grall >> >>

Re: [Xen-devel] [PATCH] x86/vmx: Fixup removals from MSR load-lists

2019-04-04 Thread Andrew Cooper
On 04/04/2019 15:42, Igor Druzhinin wrote: I'd add "entries" to the subject, which can be done on commit. > Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context") > introduced a regression on Harpertown and earlier cores (Gen 1 VT-x) > where as soon as guest EFER becomes equal to

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread George Dunlap
> On Apr 4, 2019, at 3:36 PM, Jan Beulich wrote: > On 04.04.19 at 15:09, wrote: >> I agree that it is confusing. It would be fine to UNSHARE here as well >> to keep things consistent but otherwise it's not really an issue as >> the entry type is checked later to ensure that this is a

Re: [Xen-devel] [PATCH v2 1/2] xen: add interface for obtaining .config from hypervisor

2019-04-04 Thread Juergen Gross
On 04/04/2019 15:27, Wei Liu wrote: > On Fri, Mar 15, 2019 at 05:29:28PM +0100, Juergen Gross wrote: >> On 15/03/2019 16:55, Andrew Cooper wrote: >>> On 14/03/2019 11:59, Juergen Gross wrote: @@ -1100,6 +1100,20 @@ typedef struct xen_sysctl_cpu_policy xen_sysctl_cpu_policy_t;

[Xen-devel] [PATCH v5 09/15] x86/iommu: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
The IOMMU architecture for the Hygon Dhyana CPU is similar to the AMD family 17h one. So add Hygon Dhyana support to it by sharing the code path of AMD. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/include/asm-x86/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git

[Xen-devel] [PATCH v5 14/15] x86/cpuid: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
The Hygon Dhyana family 18h processor shares the same cpuid leaves as the AMD family 17h one. So add Hygon Dhyana support to caculate the cpuid policies as the AMD CPU does. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/cpuid.c | 10 +++--- 1 file changed, 7 insertions(+), 3

[Xen-devel] [PATCH v5 11/15] x86/domain: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
Add Hygon Dhyana support to handle HyperTransport range. Also loading a nul selector does not clear bases and limits on Hygon CPUs, so add Hygon Dhyana support to the function preload_segment. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/dom0_build.c | 3 ++-

[Xen-devel] [PATCH v5 10/15] x86/pv: Add Hygon Dhyana support to emulate MSRs access

2019-04-04 Thread Pu Wen
The Hygon Dhyana CPU supports lots of MSRs(such as perf event select and counter MSRs, hardware configuration MSR, MMIO configuration base address MSR, MPERF/APERF MSRs) as AMD CPU does, so add Hygon Dhyana support to the PV emulation infrastructure by using the code path of AMD. Signed-off-by:

[Xen-devel] [PATCH v5 07/15] x86/apic: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
Add Hygon Dhyana support to use modern APIC. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/apic.c | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index e6130cf..65228cb 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c

[Xen-devel] [PATCH v5 08/15] x86/acpi: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
Add Hygon Dhyana support to the acpi cpufreq and cpuidle subsystems by using the code path of AMD. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/acpi/cpu_idle.c | 3 ++- xen/arch/x86/acpi/cpufreq/cpufreq.c | 8 +--- xen/arch/x86/acpi/cpufreq/powernow.c | 3 ++- 3

[Xen-devel] [PATCH v5 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-04 Thread Pu Wen
Add x86 architecture support for a new processor: Hygon Dhyana Family 18h. To make Hygon initialization flow more clear, carve out code from amd.c into a separate file hygon.c, and remove unnecessary code for Hygon Dhyana. To identify Hygon Dhyana CPU, add a new vendor type X86_VENDOR_HYGON and

[Xen-devel] [PATCH v5 13/15] x86/traps: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
The Hygon Dhyana processor has the methold to get the last exception source IP from MSR_01DD. So add support for it if the boot param ler is true. Signed-off-by: Pu Wen Acked-by: Jan Beulich --- xen/arch/x86/traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Xen-devel] [PATCH] MAINTAINERS: Move xen/lib/x86 under x86 maintainership

2019-04-04 Thread Julien Grall
At the moment, xen/lib/x86 is covered by the "REST". However, this is x86-only, so this can fall under the x86 maintainership. Signed-off-by: Julien Grall --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index ba7527c423..a9929a91de 100644 ---

[Xen-devel] [PATCH] xen: vcpu_migrate_start can be static

2019-04-04 Thread Wei Liu
It's not used outside of schedule.c. Signed-off-by: Wei Liu --- xen/common/schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 26298c09fc..39b87a7682 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@

Re: [Xen-devel] [PATCH] MAINTAINERS: Move xen/lib/x86 under x86 maintainership

2019-04-04 Thread Jan Beulich
>>> On 04.04.19 at 16:04, wrote: > At the moment, xen/lib/x86 is covered by the "REST". However, this is > x86-only, so this can fall under the x86 maintainership. > > Signed-off-by: Julien Grall Acked-by: Jan Beulich Thanks for noticing. Would you mind adding xen/include/xen/lib/x86/ at

Re: [Xen-devel] [PATCH] MAINTAINERS: Move xen/lib/x86 under x86 maintainership

2019-04-04 Thread Andrew Cooper
On 04/04/2019 15:04, Julien Grall wrote: > At the moment, xen/lib/x86 is covered by the "REST". However, this is > x86-only, so this can fall under the x86 maintainership. > > Signed-off-by: Julien Grall Reviewed-by: Andrew Cooper Sorry - this is almost certainly my fault

Re: [Xen-devel] [PATCH RFC] x86/cpu: fix vendor string for Shanghai CPU

2019-04-04 Thread Andrew Cooper
On 04/04/2019 15:11, Wei Liu wrote: > Signed-off-by: Wei Liu Sadly not.  This is a char[8] field (so loses the \0 terminator), which then gets passed to %s I've got an overhaul to this area of code in the works, and am planning to remove this field entirely, ~Andrew

Re: [Xen-devel] [PATCH] MAINTAINERS: Move xen/lib/x86 under x86 maintainership

2019-04-04 Thread Andrew Cooper
On 04/04/2019 15:20, Julien Grall wrote: > Hi, > > On 04/04/2019 15:19, Jan Beulich wrote: > On 04.04.19 at 16:04, wrote: >>> At the moment, xen/lib/x86 is covered by the "REST". However, this is >>> x86-only, so this can fall under the x86 maintainership. >>> >>> Signed-off-by: Julien Grall

[Xen-devel] [PATCH] x86/vmx: Fixup removals from MSR load-lists

2019-04-04 Thread Igor Druzhinin
Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context") introduced a regression on Harpertown and earlier cores (Gen 1 VT-x) where as soon as guest EFER becomes equal to Xen EFER (almost any 64-bit VM) stale version of EFER is incorrectly loaded into a guest causing almost immediate

Re: [Xen-devel] [PATCH] xen: vcpu_migrate_start can be static

2019-04-04 Thread George Dunlap
> On Apr 4, 2019, at 3:13 PM, Wei Liu wrote: > > It's not used outside of schedule.c. > > Signed-off-by: Wei Liu Acked-by: George Dunlap ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH] xen: Prevent buffer overflow in privcmd ioctl

2019-04-04 Thread Boris Ostrovsky
On 4/4/19 11:12 AM, Dan Carpenter wrote: > The "call" variable comes from the user in privcmd_ioctl_hypercall(). > It's an offset into the hypercall_page[] which has (PAGE_SIZE / 32) > elements. We need to put an upper bound on it to prevent an out of > bounds access. > > Fixes: 1246ae0bb992

[Xen-devel] [linux-4.4 test] 134267: trouble: blocked/broken/fail/pass

2019-04-04 Thread osstest service owner
flight 134267 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134267/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken build-arm64-pvops

Re: [Xen-devel] [PATCH v5 00/15] Add support for Hygon Dhyana Family 18h processor

2019-04-04 Thread Pu Wen
On 2019/4/4 22:08, Julien Grall wrote: Hi, I am not sure why I end up to be CCed on the cover letter when I am not CCed on the rest of series. The patch 01/15 of the series is CCed to you. :) -- Regards, Pu Wen ___ Xen-devel mailing list

[Xen-devel] [PATCH v2] x86/vmx: Fixup removals of MSR load/save list entries

2019-04-04 Thread Igor Druzhinin
Commit 540d5422 ("x86/vmx: Support removing MSRs from the host/guest load/save lists") introduced infrastructure finally exposed by commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context") that led to a functional regression on Harpertown and earlier cores (Gen 1 VT-x) due to MSR count

Re: [Xen-devel] [PATCH v5 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-04 Thread Pu Wen
On 2019/4/4 22:07, Andrew Cooper wrote: On 04/04/2019 14:45, Pu Wen wrote: index 774ceac..75fefcf 100644 --- a/xen/include/asm-x86/x86-vendors.h +++ b/xen/include/asm-x86/x86-vendors.h @@ -30,6 +30,11 @@ #define X86_VENDOR_SHANGHAI_ECX 0x20206961U #define X86_VENDOR_SHANGHAI_EDX 0x68676e61U

Re: [Xen-devel] [PATCH v5 15/15] tools/libxc: Add Hygon Dhyana support

2019-04-04 Thread Pu Wen
On 2019/4/5 0:38, Wei Liu wrote: On Thu, Apr 04, 2019 at 09:48:13PM +0800, Pu Wen wrote: Add Hygon Dhyana support to caculate the cpuid policies for creating PV or HVM guest by using the code path of AMD. Signed-off-by: Pu Wen Acked-by: Wei Liu Thanks. -- Regards, Pu Wen

Re: [Xen-devel] [PATCH v5 15/15] tools/libxc: Add Hygon Dhyana support

2019-04-04 Thread Wei Liu
On Thu, Apr 04, 2019 at 09:48:13PM +0800, Pu Wen wrote: > Add Hygon Dhyana support to caculate the cpuid policies for creating PV > or HVM guest by using the code path of AMD. > > Signed-off-by: Pu Wen Acked-by: Wei Liu ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH v5 00/15] Add support for Hygon Dhyana Family 18h processor

2019-04-04 Thread Julien Grall
On 04/04/2019 17:47, Pu Wen wrote: On 2019/4/4 22:08, Julien Grall wrote: Hi, I am not sure why I end up to be CCed on the cover letter when I am not CCed on the rest of series. The patch 01/15 of the series is CCed to you. :) I did notice it afterwards. But the code is only x86

[Xen-devel] [PULL 0/2] xen queue for 4.0-rc3

2019-04-04 Thread Anthony PERARD
/pull-xen-20190404 for you to fetch changes up to 2bcd05cf24a7de34e7e265247c010977e43f40bc: xen-block: scale sector based quantities correctly (2019-04-04 18:00:07 +0100) Xen queue xen-block fixes

[Xen-devel] [PULL 2/2] xen-block: scale sector based quantities correctly

2019-04-04 Thread Anthony PERARD
From: Paul Durrant The Xen blkif protocol requires that sector based quantities should be interpreted strictly as multiples of 512 bytes. Specifically: "first_sect and last_sect in blkif_request_segment, as well as sector_number in blkif_request, are always expressed in 512-byte units." Commit

[Xen-devel] [PULL 1/2] xen-block: only advertize discard to the frontend when it is enabled...

2019-04-04 Thread Anthony PERARD
From: Paul Durrant ...and properly enable it when synthesizing a drive. The Xen toolstack sets 'discard-enable' to '1' in xenstore when it wants to enable discard on a specified image. The code in xen_block_drive_create() correctly parses this and uses it to set 'discard' to 'unmap' for the

[Xen-devel] [PATCH 1/2] libxl: Add virtio vga interface support for qemu

2019-04-04 Thread Chris Patterson
From: Chris Patterson To enable it, set vga="virtio". Default videoram for virtio-vga is set to match current QEMU default with 256MB. Signed-off-by: Chris Patterson --- docs/man/xl.cfg.5.pod.in| 4 +++- tools/libxl/libxl.h | 10 ++ tools/libxl/libxl_create.c | 9

[Xen-devel] [PATCH 2/2] libxl_dm: honor opengl flag for SDL

2019-04-04 Thread Chris Patterson
From: Chris Patterson It was honored in libxl__build_device_model_args_old(), but did not transition to libxl__build_device_model_args_new(). The opengl flag is useful for SDL to toggle virgl when using virtio-vga. To accomplish this, we also switch from the short-hand "-sdl" notation to

[Xen-devel] [PATCH 4/5] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-04 Thread Andrew Cooper
From: Pu Wen Add x86 architecture support for a new processor: Hygon Dhyana Family 18h. To make Hygon initialization flow more clear, carve out code from amd.c into a separate file hygon.c, and remove unnecessary code for Hygon Dhyana. To identify Hygon Dhyana CPU, add a new vendor type

[Xen-devel] [PATCH 2/5] x86/cpu: Introduce x86_cpuid_vendor_to_str() and drop cpu_dev.c_vendor[]

2019-04-04 Thread Andrew Cooper
cpu_dev.c_vendor[] is a char[8] array which is printed using %s in two locations. This leads to subtle lack-of-NUL bugs when using an 8 character vendor name. Introduce x86_cpuid_vendor_to_str() to turn an x86_vendor into a printable string, use it in the two locations that c_vendor is used, and

[Xen-devel] [PATCH 1/5] x86/cpu: Drop cpu_devs[] and $VENDOR_init_cpu() hooks

2019-04-04 Thread Andrew Cooper
These helpers each fill in a single cpu_devs[] pointer, and since c/s 00b4f4d0f "x86/cpuid: Drop get_cpu_vendor() completely", this array is read exactly once on boot. Delete the hooks and cpu_devs[], and have early_cpu_detect() pick the appropriate cpu_dev structure directly. Signed-off-by:

[Xen-devel] [PATCH 0/5] x86/cpu: Rework of X86_VENDOR_* constants

2019-04-04 Thread Andrew Cooper
Pu: I'm sorry to keep on breaking the code you're working, but I think the changes here will simplify your Hygon series somewhat. See patch 3 for the best example. To apologise, I've also rebased your v5 Patch 1 over the changes here (patch 4 in this series), to save you the work. I'll also fix

  1   2   >