Re: [Xen-devel] [PATCH v3] hvm/svm: Implement CPUID events

2018-02-23 Thread Tamas K Lengyel
On Fri, Feb 23, 2018 at 2:46 AM, Alexandru Isaila wrote: > At this moment the CPUID events for the AMD architecture are not > forwarded to the monitor layer. > > This patch adds the CPUID event to the common capabilities and then > forwards the event to the monitor layer.

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Tamas K Lengyel
On Mon, Jan 8, 2018 at 5:49 AM, Alexandru Isaila wrote: > This patch is adding a way to enable/disable nested pagefault > events. It introduces the xc_monitor_nested_pagefault function > and adds the nested_pagefault_disabled in the monitor structure. > This is needed by

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Tamas K Lengyel
On Fri, Feb 23, 2018 at 3:25 PM, Razvan Cojocaru wrote: > On 02/24/2018 12:06 AM, Tamas K Lengyel wrote: >> On Mon, Jan 8, 2018 at 5:49 AM, Alexandru Isaila >> wrote: >>> This patch is adding a way to enable/disable nested pagefault >>> events.

[Xen-devel] [v1 1/1] xen, mm: Allow deferred page initialization for xen pv domains

2018-02-23 Thread Pavel Tatashin
Juergen Gross noticed that commit f7f99100d8d ("mm: stop zeroing memory during allocation in vmemmap") broke XEN PV domains when deferred struct page initialization is enabled. This is because the xen's PagePinned() flag is getting erased from struct pages when they are initialized later in boot.

[Xen-devel] [v1 0/1] Allow deferred page initialization for xen pv

2018-02-23 Thread Pavel Tatashin
From this discussion: https://www.spinics.net/lists/linux-mm/msg145604.html I investigated whether it is feasible to re-enable deferred page initialization on xen's para-vitalized domains. After studying the code, I found non-intrusive way to do just that. All we need to do is to assume that

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Razvan Cojocaru
On 02/24/2018 12:31 AM, Tamas K Lengyel wrote: > On Fri, Feb 23, 2018 at 3:25 PM, Razvan Cojocaru > wrote: >> On 02/24/2018 12:06 AM, Tamas K Lengyel wrote: >>> On Mon, Jan 8, 2018 at 5:49 AM, Alexandru Isaila >>> wrote: This patch is

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Razvan Cojocaru
On 02/24/2018 12:06 AM, Tamas K Lengyel wrote: > On Mon, Jan 8, 2018 at 5:49 AM, Alexandru Isaila > wrote: >> This patch is adding a way to enable/disable nested pagefault >> events. It introduces the xc_monitor_nested_pagefault function >> and adds the

[Xen-devel] [qemu-mainline test] 119894: tolerable FAIL - PUSHED

2018-02-23 Thread osstest service owner
flight 119894 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/119894/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 119797 test-armhf-armhf-libvirt 14

Re: [Xen-devel] [PATCH] fuzz/x86_emulate: fix bounds for input size

2018-02-23 Thread Paul Semel
On 02/23/2018 05:30 PM, Wei Liu wrote: On Fri, Feb 23, 2018 at 12:57:26AM +0100, Paul Semel wrote: The minimum size for the input size was set to DATA_OFFSET + 1 which was meaning that we were requesting at least one character of the data array to be filled. This is not needed for the fuzzer

[Xen-devel] [PATCH v2] fuzz/x86_emulate: fix bounds for input size

2018-02-23 Thread Paul Semel
The maximum size for the input size was set to INPUT_SIZE, which is actually the size of the data array inside the fuzz_corpus structure and so was not abling user (or AFL) to fill in the whole structure. Changing to sizeof(struct fuzz_corpus) correct this problem. Signed-off-by: Paul Semel

Re: [Xen-devel] [PATCH v5 01/18] xen/arm: psci: Rework the PSCI definitions

2018-02-23 Thread Stefano Stabellini
On Fri, 23 Feb 2018, Julien Grall wrote: > Some PSCI functions are only available in the 32-bit version. After > recent changes, Xen always needs to know whether the call was made using > 32-bit id or 64-bit id. So we don't emulate reserved one. > > With the current naming scheme, it is not easy

Re: [Xen-devel] [PATCH v3 2/2] vmx/hap: optimize CR4 trapping

2018-02-23 Thread Tian, Kevin
> From: Roger Pau Monné [mailto:roger@citrix.com] > Sent: Friday, February 23, 2018 6:18 PM > > On Fri, Feb 23, 2018 at 04:56:38AM +, Tian, Kevin wrote: > > > From: Roger Pau Monne [mailto:roger@citrix.com] > > > Sent: Tuesday, February 20, 2018 4:57 PM > > > > > > There a bunch of

Re: [Xen-devel] [PATCH RFC 00/10] x86 passthrough code cleanup

2018-02-23 Thread Doug Goldstein
On 2/22/18 11:12 PM, Tian, Kevin wrote: >> From: Wei Liu >> Sent: Thursday, February 22, 2018 5:47 AM >> >> Hi all >> >> At some point I would like to make CONFIG_HVM and CONFIG_PV work. >> The >> passthrough code is one of the road blocks for that work. > > Can you elaborate the motivation of

Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-23 Thread Jim Fehlig
On 02/22/2018 06:53 AM, Juergen Gross wrote: When creating a pthread in xs_watch() try to get the minimal needed size of the thread from glibc instead of using a constant. This avoids problems when the library is used in programs with large per-thread memory. Use dlsym() to get the pointer to

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-23 Thread Tian, Kevin
> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] > Sent: Friday, February 23, 2018 3:32 PM > > On 02/23/2018 09:29 AM, Razvan Cojocaru wrote: > > Lacking PCID support in the emulation layer creates two different way of > > handling the NOFLUSH being set: one is in hardware, and this

Re: [Xen-devel] [PATCH v4 20/28] xen/pt: when binding guest msi, accept the whole msi message

2018-02-23 Thread Chao Gao
On Mon, Feb 12, 2018 at 03:16:25PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:27PM +0800, Chao Gao wrote: >> ... rather than a filtered one. Previously, some fields (reserved or >> unalterable) are filtered by QEMU. These fields are useless for the >> legacy interrupt format

Re: [Xen-devel] [PATCH v4 2/7] xen: xsm: flask: introduce XENMAPSPACE_gmfn_share for memory sharing

2018-02-23 Thread Zhongze Liu
Hi Jan, (Last week was the Chinese Spring Festival, so I failed to follow up timely. Sorry for that.) 2018-02-15 16:58 GMT+08:00 Jan Beulich : On 14.02.18 at 18:02, wrote: >> 2018-02-14 16:37 GMT+08:00 Jan Beulich : >> On

Re: [Xen-devel] [PATCH v4 18/28] x86/vioapic: Hook interrupt delivery of vIOAPIC

2018-02-23 Thread Tian, Kevin
> From: Gao, Chao > Sent: Saturday, February 24, 2018 9:51 AM > > On Mon, Feb 12, 2018 at 02:54:02PM +, Roger Pau Monné wrote: > >On Fri, Nov 17, 2017 at 02:22:25PM +0800, Chao Gao wrote: > >> When irq remapping is enabled, IOAPIC Redirection Entry may be in > remapping > >> format. If that,

Re: [Xen-devel] [PATCH v5 11/18] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-23 Thread Stefano Stabellini
On Fri, 23 Feb 2018, Julien Grall wrote: > Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > Changes in v5: > - Fold the fixup! patch which

Re: [Xen-devel] Minutes of the Xen ARM community call Tuesday 13th February 5PM UTC

2018-02-23 Thread Stefano Stabellini
On Thu, 15 Feb 2018, Stefano Stabellini wrote: > = AGL Whitepaper = > Artem: please review the whitepaper, most of the content is already > there. > Everybody agrees that Xen Project should publish its own whitepaper. > > Certifications are mostly not about the code. Artem about to share an >

[Xen-devel] [xen-4.6-testing test] 119921: regressions - FAIL

2018-02-23 Thread osstest service owner
flight 119921 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/119921/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-nested-intel 17 debian-hvm-install/l1/l2 fail REGR. vs. 119227 Tests

Re: [Xen-devel] [PATCH v4 18/28] x86/vioapic: Hook interrupt delivery of vIOAPIC

2018-02-23 Thread Chao Gao
On Mon, Feb 12, 2018 at 02:54:02PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:25PM +0800, Chao Gao wrote: >> When irq remapping is enabled, IOAPIC Redirection Entry may be in remapping >> format. If that, generate an irq_remapping_request and call the common > >"If that's the

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-23 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Friday, February 23, 2018 5:35 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 23 February 2018 05:36 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org >

Re: [Xen-devel] [PATCH v2] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-23 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, February 23, 2018 4:37 PM > > ... for non-existent MSRs: wrmsr_hypervisor_regs()'s comment clearly > says that the function returns 0 for unrecognized MSRs, so > {svm,vmx}_msr_write_intercept() should not convert this into success. We

Re: [Xen-devel] [PATCH v3] tools: detect appropriate debug optimization level

2018-02-23 Thread Doug Goldstein
On 4/28/16 12:40 PM, Wei Liu wrote: > On Tue, Apr 26, 2016 at 09:38:45AM -0500, Doug Goldstein wrote: >> When building debug use -Og as the optimization level if its available, >> otherwise retain the use of -O0. -Og has been added by GCC to enable all >> optimizations that to not affect debugging

Re: [Xen-devel] [PATCH v4 21/28] vvtd: update hvm_gmsi_info when binding guest msi with pirq or

2018-02-23 Thread Chao Gao
On Mon, Feb 12, 2018 at 03:38:07PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:28PM +0800, Chao Gao wrote: >> ... handlding guest's invalidation request. >> >> To support pirq migration optimization and using VT-d posted interrupt to >> inject msi from assigned devices, each time

Re: [Xen-devel] [PATCH 5/7] public / x86: introduce __HYPERCALL_iommu_op

2018-02-23 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Friday, February 23, 2018 5:41 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 23 February 2018 05:17 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org >

Re: [Xen-devel] [RFC Patch v4 8/8] x86/hvm: bump the maximum number of vcpus to 512

2018-02-23 Thread Chao Gao
On Fri, Feb 23, 2018 at 06:11:39PM +, Roger Pau Monné wrote: >On Wed, Dec 06, 2017 at 03:50:14PM +0800, Chao Gao wrote: >> Signed-off-by: Chao Gao >> --- >> xen/include/public/hvm/hvm_info_table.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git

[Xen-devel] [libvirt test] 119943: tolerable all pass - PUSHED

2018-02-23 Thread osstest service owner
flight 119943 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/119943/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 119874 test-armhf-armhf-libvirt-raw 13

Re: [Xen-devel] [RFC Patch v4 4/8] hvmloader: boot cpu through broadcast

2018-02-23 Thread Chao Gao
On Fri, Feb 23, 2018 at 04:42:10PM +, Roger Pau Monné wrote: >On Wed, Dec 06, 2017 at 03:50:10PM +0800, Chao Gao wrote: >> Intel SDM Extended XAPIC (X2APIC) -> "Initialization by System Software" >> has the following description: >> >> "The ACPI interfaces for the x2APIC are described in

[Xen-devel] [PATCH][next] xen-netback: make function xenvif_rx_skb static

2018-02-23 Thread Colin King
From: Colin Ian King The function xenvif_rx_skb is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/net/xen-netback/rx.c:422:6: warning: symbol 'xenvif_rx_skb' was not declared. Should it be static?

Re: [Xen-devel] [PATCH v4 17/28] x86/vvtd: save and restore emulated VT-d

2018-02-23 Thread Roger Pau Monné
On Fri, Feb 23, 2018 at 01:22:23PM +0800, Chao Gao wrote: > On Mon, Feb 12, 2018 at 02:49:12PM +, Roger Pau Monné wrote: > >On Fri, Nov 17, 2017 at 02:22:24PM +0800, Chao Gao wrote: > > > >> +struct hvm_hw_vvtd > >> +{ > >> +uint32_t eim_enabled : 1, > >> + intremap_enabled :

Re: [Xen-devel] [PATCH v4 10/16] xen/mm: Switch map_pages_to_xen to use MFN typesafe

2018-02-23 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:53PM +, Julien Grall wrote: > The current prototype is slightly confusing because it takes a virtual > address and a physical frame (not address!). Switching to MFN will improve > safety and reduce the chance to mistakenly invert the 2 parameters. > >

Re: [Xen-devel] [PATCH v4 11/16] xen/mm: Switch page_alloc.c to typesafe MFN

2018-02-23 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:54PM +, Julien Grall wrote: > No functional change intended. > > Signed-off-by: Julien Grall Reviewed-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

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

2018-02-23 Thread osstest service owner
flight 119966 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/119966/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [Xen-devel] [PATCH v4 12/16] xen/mm: Switch common/memory.c to use typesafe MFN

2018-02-23 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:55PM +, Julien Grall wrote: > A new helper copy_mfn_to_guest is introduced to easily to copy a MFN to > the guest memory. > > Not functional change intended Is there a reason to not make all guest accessors tyep-safe instead? Wei.

Re: [Xen-devel] [PATCH 3/7] x86/alt: Clean up the assembly used to generate alternatives

2018-02-23 Thread Jan Beulich
>>> On 23.02.18 at 17:24, wrote: > On 23/02/18 15:12, Jan Beulich wrote: > On 23.02.18 at 15:03, wrote: >>> On 13/02/18 14:37, Jan Beulich wrote: >>> On 12.02.18 at 12:23, wrote: > ---

Re: [Xen-devel] [PATCH v4 13/16] xen/grant: Switch {create, replace}_grant_p2m_mapping to typesafe MFN

2018-02-23 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:56PM +, Julien Grall wrote: > The current prototype is slightly confusing because it takes a guest > physical address and a machine physical frame (not address!). Switching to > MFN will improve safety and reduce the chance to mistakenly invert the > 2 parameters.

Re: [Xen-devel] [PATCH v4 08/28] x86/vvtd: Add MMIO handler for VVTD

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 05:07:09PM +, Roger Pau Monné wrote: > On Thu, Feb 22, 2018 at 02:20:12PM +0800, Chao Gao wrote: > > On Fri, Feb 09, 2018 at 05:51:29PM +, Roger Pau Monné wrote: > > >On Sat, Feb 10, 2018 at 01:21:09AM +0800, Chao Gao wrote: > > >> On Fri, Feb 09, 2018 at 04:39:15PM

Re: [Xen-devel] [PATCH v4 12/16] xen/mm: Switch common/memory.c to use typesafe MFN

2018-02-23 Thread Julien Grall
On 23/02/18 17:26, Wei Liu wrote: On Wed, Feb 21, 2018 at 02:02:55PM +, Julien Grall wrote: A new helper copy_mfn_to_guest is introduced to easily to copy a MFN to the guest memory. Not functional change intended Is there a reason to not make all guest accessors tyep-safe instead?

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Wei Liu
On Mon, Jan 08, 2018 at 02:49:44PM +0200, Alexandru Isaila wrote: > This patch is adding a way to enable/disable nested pagefault > events. It introduces the xc_monitor_nested_pagefault function > and adds the nested_pagefault_disabled in the monitor structure. > This is needed by the

Re: [Xen-devel] [PATCH v4 08/28] x86/vvtd: Add MMIO handler for VVTD

2018-02-23 Thread Roger Pau Monné
On Thu, Feb 22, 2018 at 02:20:12PM +0800, Chao Gao wrote: > On Fri, Feb 09, 2018 at 05:51:29PM +, Roger Pau Monné wrote: > >On Sat, Feb 10, 2018 at 01:21:09AM +0800, Chao Gao wrote: > >> On Fri, Feb 09, 2018 at 04:39:15PM +, Roger Pau Monné wrote: > >> >On Fri, Nov 17, 2017 at 02:22:15PM

Re: [Xen-devel] [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-23 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:59PM +, Julien Grall wrote: > Most of the users of page_to_mfn and mfn_to_page are either overriding > the macros to make them work with mfn_t or use mfn_x/_mfn because the > rest of the function use mfn_t. > > So make page_to_mfn and mfn_to_page return mfn_t by

Re: [Xen-devel] [PATCH][next] xen-netback: make function xenvif_rx_skb static

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 05:16:57PM +, Colin King wrote: > From: Colin Ian King > > The function xenvif_rx_skb is local to the source and does not need > to be in global scope, so make it static. > > Cleans up sparse warning: > drivers/net/xen-netback/rx.c:422:6:

Re: [Xen-devel] [PATCH v8 03/11] x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0

2018-02-23 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 23 February 2018 15:57 > To: Paul Durrant ; Roger Pau Monne > > Cc: Andrew Cooper ; xen- > de...@lists.xenproject.org; Boris Ostrovsky

Re: [Xen-devel] [RFC PATCH 38/49] ARM: new VGIC: handle hardware mapped IRQs

2018-02-23 Thread Andre Przywara
Hi, On 19/02/18 12:19, Julien Grall wrote: > Hi, > > On 09/02/18 14:39, Andre Przywara wrote: >> The VGIC supports virtual IRQs to be connected to a hardware IRQ, so >> when a guest EOIs the virtual interrupt, it affects the state of that >> corresponding interrupt on the hardware side at the

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

2018-02-23 Thread osstest service owner
flight 119879 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/119879/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl6 xen-install fail REGR. vs. 119713 Tests which did

Re: [Xen-devel] [PATCH RFC 00/10] x86 passthrough code cleanup

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 05:12:05AM +, Tian, Kevin wrote: > > From: Wei Liu > > Sent: Thursday, February 22, 2018 5:47 AM > > > > Hi all > > > > At some point I would like to make CONFIG_HVM and CONFIG_PV work. > > The > > passthrough code is one of the road blocks for that work. > > Can you

Re: [Xen-devel] [PATCH v4 11/28] x86/vvtd: Process interrupt remapping request

2018-02-23 Thread Roger Pau Monné
On Sun, Feb 11, 2018 at 01:31:41PM +0800, Chao Gao wrote: > On Fri, Feb 09, 2018 at 05:44:17PM +, Roger Pau Monné wrote: > >On Fri, Nov 17, 2017 at 02:22:18PM +0800, Chao Gao wrote: > >> +static int vvtd_delivery(struct domain *d, uint8_t vector, > >> + uint32_t dest,

[Xen-devel] [PATCH LP-BUILD-TOOLS] Allow patching files compiled multiple times

2018-02-23 Thread Ross Lagerwall
gas prior to binutils commit fbdf9406b0 (appears in 2.27) outputs symbol table entries resulting from .file in reverse order. If we get two consecutive file symbols, prefer the first one if that names an object file or has a directory component (to cover multiply compiled files). This is the same

Re: [Xen-devel] [RFC Patch v4 8/8] x86/hvm: bump the maximum number of vcpus to 512

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 01:50:05AM -0700, Jan Beulich wrote: > >>> On 22.02.18 at 19:46, wrote: > > On Wed, Dec 06, 2017 at 03:50:14PM +0800, Chao Gao wrote: > >> --- a/xen/include/public/hvm/hvm_info_table.h > >> +++ b/xen/include/public/hvm/hvm_info_table.h > >> @@ -32,7

Re: [Xen-devel] [PATCH v8 01/11] vpci: introduce basic handlers to trap accesses to the PCI config space

2018-02-23 Thread Roger Pau Monné
On Fri, Feb 23, 2018 at 04:02:17PM +, Julien Grall wrote: > Hi, > > On 23/02/18 15:55, Jan Beulich wrote: > > > > > On 23.01.18 at 16:07, wrote: > > > diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S > > > index c9b9546435..98b82680c6 100644 > > > ---

Re: [Xen-devel] [PATCH v4 14/16] xen/grant: Switch common/grant_table.c to use typesafe MFN

2018-02-23 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:57PM +, Julien Grall wrote: > No functional change intended. > > Signed-off-by: Julien Grall Reviewed-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH] libxl: add libxl__is_driver_domain function

2018-02-23 Thread Wei Liu
On Tue, Feb 13, 2018 at 03:32:04PM +0200, Oleksandr Grytsov wrote: > On Tue, Feb 13, 2018 at 2:06 PM, Wei Liu wrote: > > > On Tue, Feb 06, 2018 at 03:08:45PM +0200, Oleksandr Grytsov wrote: > > > On Tue, Feb 6, 2018 at 2:36 PM, Wei Liu wrote: > > > > >

Re: [Xen-devel] [PATCH v8 01/11] vpci: introduce basic handlers to trap accesses to the PCI config space

2018-02-23 Thread Julien Grall
Hi Roger, On 23/02/18 17:25, Roger Pau Monné wrote: On Fri, Feb 23, 2018 at 04:02:17PM +, Julien Grall wrote: Hi, On 23/02/18 15:55, Jan Beulich wrote: On 23.01.18 at 16:07, wrote: diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index

Re: [Xen-devel] [PATCH v4 12/16] xen/mm: Switch common/memory.c to use typesafe MFN

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 05:46:39PM +, Julien Grall wrote: > > > On 23/02/18 17:26, Wei Liu wrote: > > On Wed, Feb 21, 2018 at 02:02:55PM +, Julien Grall wrote: > > > A new helper copy_mfn_to_guest is introduced to easily to copy a MFN to > > > the guest memory. > > > > > > Not

Re: [Xen-devel] [RFC Patch v4 4/8] hvmloader: boot cpu through broadcast

2018-02-23 Thread Jan Beulich
>>> On 22.02.18 at 19:44, wrote: > On Wed, Dec 06, 2017 at 03:50:10PM +0800, Chao Gao wrote: >> +"mov $lock,%edx\n" > > Not really an expert in x86 asm -- shouldn't this be lea instead? No, when MOV can be used it's preferable as having a 1 byte

Re: [Xen-devel] [RFC PATCH 30/49] ARM: new VGIC: Add ENABLE registers handlers

2018-02-23 Thread Andre Przywara
Hi, On 16/02/18 16:57, Julien Grall wrote: > Hi Andre, > > On 09/02/18 14:39, Andre Przywara wrote: >> As the enable register handlers are shared between the v2 and v3 >> emulation, their implementation goes into vgic-mmio.c, to be easily >> referenced from the v3 emulation as well later. >> >>

Re: [Xen-devel] [PATCH 8/9] drm/xen-front: Implement GEM operations

2018-02-23 Thread Oleksandr Andrushchenko
On 02/23/2018 05:26 PM, Boris Ostrovsky wrote: On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: +static struct xen_gem_object *gem_create(struct drm_device *dev, size_t size) +{ + struct xen_drm_front_drm_info *drm_info = dev->dev_private; + struct xen_gem_object *xen_obj; +

Re: [Xen-devel] [PATCH v8 03/11] x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0

2018-02-23 Thread Jan Beulich
>>> On 23.01.18 at 16:07, wrote: > So that MMCFG regions not present in the MCFG ACPI table can be added > at run time by the hardware domain. > > Signed-off-by: Roger Pau Monné > Reviewed-by: Jan Beulich > --- > Cc: Jan Beulich

[Xen-devel] [PATCH v4 13/19] xen/arm64: Kill PSCI_GET_VERSION as a variant-2 workaround

2018-02-23 Thread Julien Grall
Now that we've standardised on SMCCC v1.1 to perform the branch prediction invalidation, let's drop the previous band-aid. If vendors haven't updated their firmware to do SMCCC 1.1, they haven't updated PSCI either, so we don't loose anything. This is aligned with the Linux commit 3a0a397ff5ff.

[Xen-devel] [PATCH v4 17/19] xen/arm: vpsci: Update the return type for MIGRATE_INFO_TYPE

2018-02-23 Thread Julien Grall
From the specification, the PSCI call MIGRATE_INFO_TYPE will return an int32_t. Update the function return type to match it. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini Cc: mirela.simono...@aggios.com --- Changes in v4:

[Xen-devel] [PATCH RFC v3] x86/domctl: Don't pause the whole domain if only getting vcpu state

2018-02-23 Thread Alexandru Isaila
This patch adds the hvm_save_one_cpu_ctxt() function. It optimizes by only pausing the vcpu on all HVMSR_PER_VCPU save callbacks where only data for one VCPU is required. Signed-off-by: Alexandru Isaila --- Changes since V2: - Added functions for all the

Re: [Xen-devel] [PATCH] README: require Python 2.6 or newer

2018-02-23 Thread Doug Goldstein
On 2/23/18 2:55 AM, Jan Beulich wrote: On 22.02.18 at 20:34, wrote: >> Increase the minimum required Python to 2.6 or newer. >> >> Signed-off-by: Doug Goldstein > > That's the easy half. Tool stack configure scripts will also want to > be adjusted (see

Re: [Xen-devel] [PATCH] README: require Python 2.6 or newer

2018-02-23 Thread George Dunlap
On 02/22/2018 07:34 PM, Doug Goldstein wrote: > Increase the minimum required Python to 2.6 or newer. > > Signed-off-by: Doug Goldstein > --- > CC: Andrew Cooper > CC: George Dunlap > CC: Ian Jackson

Re: [Xen-devel] [PATCH v2 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-23 Thread Andrew Cooper
On 23/02/18 15:05, Jan Beulich wrote: On 21.02.18 at 12:36, wrote: >> There are many problems with MSR_TSC_AUX handling. >> >> To begin with, the RDPID instruction reads MSR_TSC_AUX, but it is only the >> RDTSCP feature which enumerates the MSR. Therefore, RDPID

Re: [Xen-devel] [PATCH 3/7] x86/alt: Clean up the assembly used to generate alternatives

2018-02-23 Thread Andrew Cooper
On 23/02/18 15:12, Jan Beulich wrote: On 23.02.18 at 15:03, wrote: >> On 13/02/18 14:37, Jan Beulich wrote: >>> >>> On 12.02.18 at 12:23, wrote: --- a/xen/include/asm-x86/alternative-asm.h +++

Re: [Xen-devel] [PATCH] libxl: set channel devid when not provided by application

2018-02-23 Thread Roger Pau Monné
On Wed, Feb 07, 2018 at 08:04:10PM -0700, Jim Fehlig wrote: > Applications like libvirt may not populate a device devid field, > delegating that to libxl. If needed, the application can later > retrieve the libxl-produced devid. Indeed most devices are handled > this way in libvirt, channel

[Xen-devel] [PATCH v4 10/19] xen/arm: smccc: Implement SMCCC v1.1 inline primitive

2018-02-23 Thread Julien Grall
One of the major improvement of SMCCC v1.1 is that it only clobbers the first 4 registers, both on 32 and 64bit. This means that it becomes very easy to provide an inline version of the SMC call primitive, and avoid performing a function call to stash the registers that woudl otherwise be

[Xen-devel] [PATCH v4 00/19] xen/arm: PSCI 1.1 and SMCCC-1.1 support and XSA-254 variant 2 update

2018-02-23 Thread Julien Grall
Hi all, Arm has recently published a SMC Calling Convention (SMCCC) specification update [1] that provides an optimised calling convention and optional, discoverable support for mitigating CVE-2017-5715 (XSA-254 variant 2). ARM Trusted Firmware (ATF) has already gained such an implementation[2].

[Xen-devel] [PATCH v4 06/19] xen/arm64: Implement a fast path for handling SMCCC_ARCH_WORKAROUND_1

2018-02-23 Thread Julien Grall
The function SMCCC_ARCH_WORKAROUND_1 will be called by the guest for hardening the branch predictor. So we want the handling to be as fast as possible. As the mitigation is applied on every guest exit, we can check for the call before saving all the context and return very early. For now, only

[Xen-devel] [PATCH v4 01/19] xen/arm: psci: Rework the PSCI definitions

2018-02-23 Thread Julien Grall
Some PSCI functions are only available in the 32-bit version. After recent changes, Xen always needs to know whether the call was made using 32-bit id or 64-bit id. So we don't emulate reserved one. With the current naming scheme, it is not easy to know which call supports 32-bit and 64-bit id.

[Xen-devel] [PATCH v4 19/19] xen/arm: vpsci: Rework the logic to start AArch32 vCPU in Thumb mode

2018-02-23 Thread Julien Grall
32-bit domain is able to select the instruction (ARM vs Thumb) to use when boot a new vCPU via CPU_ON. This is indicated via bit[0] of the entry point address (see "T32 support" in PSCI v1.1 DEN0022D). bit[0] must be cleared when setting the PC. At the moment, Xen is setting the CPSR.T but never

[Xen-devel] [PATCH v4 02/19] xen/arm: vpsci: Add support for PSCI 1.1

2018-02-23 Thread Julien Grall
At the moment, Xen provides virtual PSCI interface compliant with 0.1 and 0.2. Since them, the specification has been updated and the latest version is 1.1 (see ARM DEN 0022D). From an implementation point of view, only PSCI_FEATURES is mandatory. The rest is optional and can be left

Re: [Xen-devel] [PATCH 6/9] drm/xen-front: Introduce DRM/KMS virtual display driver

2018-02-23 Thread Boris Ostrovsky
On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: > + > +struct drm_driver xen_drm_driver = { > + .driver_features = DRIVER_GEM | DRIVER_MODESET | > + DRIVER_PRIME | DRIVER_ATOMIC, > + .lastclose = lastclose, > +

Re: [Xen-devel] [PATCH 3/7] x86/alt: Clean up the assembly used to generate alternatives

2018-02-23 Thread Jan Beulich
>>> On 23.02.18 at 15:03, wrote: > On 13/02/18 14:37, Jan Beulich wrote: >> >>> On 12.02.18 at 12:23, wrote: >>> --- a/xen/include/asm-x86/alternative-asm.h >>> +++ b/xen/include/asm-x86/alternative-asm.h >>> @@ -9,60 +9,67 @@ >>> * enough

Re: [Xen-devel] [PATCH 6/9] drm/xen-front: Introduce DRM/KMS virtual display driver

2018-02-23 Thread Oleksandr Andrushchenko
On 02/23/2018 05:12 PM, Boris Ostrovsky wrote: On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: + +struct drm_driver xen_drm_driver = { + .driver_features = DRIVER_GEM | DRIVER_MODESET | +DRIVER_PRIME | DRIVER_ATOMIC, + .lastclose

Re: [Xen-devel] [PATCH v8 01/11] vpci: introduce basic handlers to trap accesses to the PCI config space

2018-02-23 Thread Julien Grall
Hi, On 23/02/18 15:55, Jan Beulich wrote: On 23.01.18 at 16:07, wrote: diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index c9b9546435..98b82680c6 100644 --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -65,6 +65,13 @@ SECTIONS

Re: [Xen-devel] [RFC PATCH v2 2/9] hyper_dmabuf: architecture specification and reference guide

2018-02-23 Thread Roger Pau Monné
On Tue, Feb 13, 2018 at 05:50:01PM -0800, Dongwon Kim wrote: > Reference document for hyper_DMABUF driver > > Documentation/hyper-dmabuf-sharing.txt This should likely be patch 1 in order for reviewers to have the appropriate context. > > Signed-off-by: Dongwon Kim >

Re: [Xen-devel] [PATCH] fuzz/x86_emulate: fix bounds for input size

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 12:57:26AM +0100, Paul Semel wrote: > The minimum size for the input size was set to DATA_OFFSET + 1 which was > meaning > that we were requesting at least one character of the data array to be filled. > This is not needed for the fuzzer to get working correctly. Sorry, I

Re: [Xen-devel] [PATCH] fuzz/x86_emulate: fix bounds for input size

2018-02-23 Thread George Dunlap
On 02/23/2018 04:30 PM, Wei Liu wrote: > On Fri, Feb 23, 2018 at 12:57:26AM +0100, Paul Semel wrote: >> The minimum size for the input size was set to DATA_OFFSET + 1 which was >> meaning >> that we were requesting at least one character of the data array to be >> filled. >> This is not needed

Re: [Xen-devel] [PATCH] fuzz/x86_emulate: fix bounds for input size

2018-02-23 Thread Wei Liu
On Fri, Feb 23, 2018 at 04:33:18PM +, George Dunlap wrote: > On 02/23/2018 04:30 PM, Wei Liu wrote: > > On Fri, Feb 23, 2018 at 12:57:26AM +0100, Paul Semel wrote: > >> The minimum size for the input size was set to DATA_OFFSET + 1 which was > >> meaning > >> that we were requesting at least

[Xen-devel] [PATCH v2 3/5] tools: libxl/xl: allow to get/set Credit1's vcpu_migration_delay

2018-02-23 Thread Dario Faggioli
Make it possible to get and set a (Credit1) scheduler's vCPU migration delay via the SCHEDOP sysctl, from both libxl and xl (no change needed in libxc). Signed-off-by: Dario Faggioli --- Cc: Ian Jackson Cc: Wei Liu Cc: George

[Xen-devel] [PATCH v2 5/5] xen/libxc: suppress direct access to Credit1's migration delay

2018-02-23 Thread Dario Faggioli
Removes special purpose access to Credit1 vCPU migration delay parameter. This fixes a build breakage, occuring when Xen is configured with SCHED_CREDIT=n. Signed-off-by: Dario Faggioli Acked-by: Wei Liu --- Cc: Ian Jackson

Re: [Xen-devel] [RFC Patch v4 4/8] hvmloader: boot cpu through broadcast

2018-02-23 Thread Roger Pau Monné
On Wed, Dec 06, 2017 at 03:50:10PM +0800, Chao Gao wrote: > Intel SDM Extended XAPIC (X2APIC) -> "Initialization by System Software" > has the following description: > > "The ACPI interfaces for the x2APIC are described in Section 5.2, “ACPI System > Description Tables,” of the Advanced

[Xen-devel] [PATCH v2 4/5] tools: xenpm: continue to support {set, get}-vcpu-migration-delay

2018-02-23 Thread Dario Faggioli
Now that it is possible to get and set the migration delay via the SCHEDOP sysctl, use that in xenpm, instead of the special purpose libxc interface (which will be removed in a following commit). The sysctl, however, requires a cpupool-id argument, for knowing on which scheduler it is operating

[Xen-devel] [PATCH v4 14/19] xen/arm: vpsci: Remove parameter 'ver' from do_common_cpu

2018-02-23 Thread Julien Grall
Currently, the behavior of do_common_cpu will slightly change depending on the PSCI version passed in parameter. Looking at the code, more the specific 0.2 behavior could move out of the function or adapted for 0.1: - x0/r0 can be updated on PSCI 0.1 because general purpose registers are

[Xen-devel] [PATCH v4 16/19] xen/arm: psci: Prefix with static any functions not exported

2018-02-23 Thread Julien Grall
A bunch of PSCI functions are not prefixed with static despite no one is using them outside the file and the prototype is not available in psci.h. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk Acked-by: Stefano Stabellini

[Xen-devel] [PATCH v4 15/19] xen/arm: psci: Consolidate PSCI version print

2018-02-23 Thread Julien Grall
Xen is printing the same way the PSCI version for 0.1, 0.2 and later. The only different is the former is hardcoded. Furthermore PSCI is now used for other things than SMP bring up. So only print the PSCI version in psci_init. Signed-off-by: Julien Grall Reviewed-by:

[Xen-devel] [PATCH v4 11/19] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-23 Thread Julien Grall
Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. Signed-off-by: Julien Grall --- Changes in v4: - Re-order saving/restoring registers in __smccc_workaround_1_smc_start Changes in v3: - Add the missing call to smc #0.

[Xen-devel] [PATCH v4 08/19] xen/arm: smccc: Add macros SMCCC_VERSION, SMCCC_VERSION_{MINOR, MAJOR}

2018-02-23 Thread Julien Grall
Add macros SMCCC_VERSION, SMCCC_VERSION_{MINOR, MAJOR} to easily convert between a 32-bit value and a version number. The encoding is based on 2.2.2 in "Firmware interfaces for mitigation CVE-2017-5715" (ARM DEN 0070A). Also re-use them to define ARM_SMCCC_VERSION_1_0 and ARM_SMCCC_VERSION_1_1.

[Xen-devel] [PATCH v4 07/19] xen/arm64: Print a per-CPU message with the BP hardening method used

2018-02-23 Thread Julien Grall
This will make easier to know whether BP hardening has been enabled for a CPU and which method is used. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babcuk Acked-by: Stefano Stabellini --- Changes in v4:

[Xen-devel] [PATCH v4 09/19] xen/arm: psci: Detect SMCCC version

2018-02-23 Thread Julien Grall
PSCI 1.0 and later allows the SMCCC version to be (indirectly) probed via PSCI_FEATURES. If the PSCI_FEATURES does not exist (PSCI 0.2 or earlier) and the function returns an error, then we assume SMCCC 1.0 is implemented. Signed-off-by: Julien Grall Reviewed-by: Stefano

[Xen-devel] [PATCH v4 03/19] xen/arm: vsmc: Implement SMCCC 1.1

2018-02-23 Thread Julien Grall
The new SMC Calling Convention (v1.1) allows for a reduced overhead when calling into the firmware, and provides a new feature discovery mechanism. See "Firmware interfaces for mitigating CVE-2017-5715" ARM DEN 00070A. Signed-off-by: Julien Grall Reviewed-by: Volodymyr

[Xen-devel] [PATCH v4 18/19] xen/arm: vpsci: Introduce and use PSCI_INVALID_ADDRESS

2018-02-23 Thread Julien Grall
PSCI 1.0 added the error return PSCI_INVALID_ADDRESS. It is used to indicate the entry point address is known to be invalid. In Xen case, this error could be returned when a 64-bit vCPU is using a Thumb entry address. For PSCI 0.1 implementation, return PSCI_INVALID_PARAMETERS instead.

[Xen-devel] [PATCH v4 05/19] xen/arm: Adapt smccc.h to be able to use it in assembly code

2018-02-23 Thread Julien Grall
Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk Acked-by: Stefano Stabellini --- Changes in v4: - Add Stefano's acked-by Changes in v2: - Add Volodymyr's reviewed-by ---

[Xen-devel] [PATCH v4 12/19] fixup! xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-23 Thread Julien Grall
--- xen/arch/arm/arm64/bpi.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/arm64/bpi.S b/xen/arch/arm/arm64/bpi.S index 981fb83a88..b59e307b0f 100644 --- a/xen/arch/arm/arm64/bpi.S +++ b/xen/arch/arm/arm64/bpi.S @@ -85,8 +85,8 @@ ENTRY(__psci_hyp_bp_inval_end)

[Xen-devel] [PATCH v4 04/19] xen/arm: vsmc: Implement SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-23 Thread Julien Grall
SMCCC 1.1 offers firmware-based CPU workarounds. In particular, SMCCC_ARCH_WORKAROUND_1 provides BP hardening for variant 2 of XSA-254 (CVE-2017-5715). If the hypervisor has some mitigation for this issue, report that we deal with it using SMCCC_ARCH_WORKAROUND_1, as we apply the hypervisor

Re: [Xen-devel] [PATCH] xtf: fix cdefs.h conflict with __section

2018-02-23 Thread Roger Pau Monné
On Thu, Feb 22, 2018 at 06:30:47AM -0700, Jan Beulich wrote: > >>> On 22.02.18 at 13:28, wrote: > > On 22/02/18 12:24, Jan Beulich wrote: > > On 22.02.18 at 13:03, wrote: > >>> On FreeBSD the build fails with: > >>> > >>>

Re: [Xen-devel] [PATCH 8/9] drm/xen-front: Implement GEM operations

2018-02-23 Thread Boris Ostrovsky
On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: > +static struct xen_gem_object *gem_create(struct drm_device *dev, size_t size) > +{ > + struct xen_drm_front_drm_info *drm_info = dev->dev_private; > + struct xen_gem_object *xen_obj; > + int ret; > + > + size =

  1   2   >