[Xen-devel] Running Driver Domain in different mode and hypervisor

2019-02-27 Thread tusherpat
Hi Guys, lately, I have been trying to play with Xen Driver Domain. I have been able to make it work where both the Driver Domain OS and the guest OS are run on paravirtualized (PV) machine. However, it doesn't work when any of them are hardware virtualized machine (HVM). Therefore, I have the fo

[Xen-devel] Running Driver Domain in different mode and hypervisor

2019-02-27 Thread tosher 1
Hi Guys, Lately, I have been trying to play with Xen Driver Domain. I have been able to make it work where both the  Driver Domain OS and the guest OS are run on paravirtualized (PV) machine. However, it doesn't work when any of them are hardware virtualized machine (HVM). Therefore, I have the

Re: [Xen-devel] [PATCH 6/6] x86/vtd: Drop struct intel_iommu

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Saturday, February 23, 2019 3:13 AM > > The sole remaining member of struct intel_iommu is the drhd backpointer. > Move > this into struct vtd_iommu, replacing the the 'intel' pointer. > > This removes one dynamic memory allocation

Re: [Xen-devel] [PATCH 5/6] x86/vtd: Drop struct iommu_flush

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Saturday, February 23, 2019 3:13 AM > > It is unclear why this abstraction exists, but iommu_get_flush() returns > possibly NULL and every user unconditionally dereferences the result. In > practice, I can't spot a path where iommu

Re: [Xen-devel] [PATCH 4/6] x86/vtd: Drop struct ir_ctrl

2019-02-27 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Monday, February 25, 2019 7:01 PM > > >>> On 25.02.19 at 11:09, wrote: > >> -Original Message- > > [snip] > >> struct iommu_flush { > >> int __must_check (*context)(void *iommu, u16 did, u16 source_id, > >>

Re: [Xen-devel] [PATCH 3/6] x86/vtd: Drop struct qi_ctrl

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Saturday, February 23, 2019 3:13 AM > > It is unclear why this abstraction exists, but iommu_qi_ctrl() returns > possibly NULL and every user unconditionally dereferences the result. In > practice, I can't spot a path where iommu is

Re: [Xen-devel] [PATCH 2/6] x86/vtd: Rename struct iommu to vtd_iommu

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Saturday, February 23, 2019 3:13 AM > > VT-d's local struct iommu is an overly-generic name, for a structure which in > practice maps 1-to-1 with the real IOMMUs in the system. > > Additionally, address style issues on impacted line

Re: [Xen-devel] [PATCH 1/6] x86/vtd: Don't include control register state in the table pointers

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Saturday, February 23, 2019 3:13 AM > > iremap_maddr and qinval_maddr point to the base of a block of contiguous > RAM, > allocated by the driver, holding the Interrupt Remapping table, and the > Queued > Invalidation ring. > > Desp

Re: [Xen-devel] [PATCH 4/4] x86/vmx: Properly flush the TLB when an altp2m is modified

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Wednesday, February 20, 2019 6:19 AM > > Modificaitons to an altp2m mark the p2m as needing flushing, but this was Modifications > never wired up in the return-to-guest path. As a result, stale TLB entries > can remain after resum

Re: [Xen-devel] [PATCH v2 3/4] x86/vmx: Fix security issue when a guest balloons out the #VE info page

2019-02-27 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Friday, February 22, 2019 4:19 AM > > The logic in altp2m_vcpu_{en,dis}able_ve() and > vmx_vcpu_update_vmfunc_ve() is > dangerous. After #VE has been set up, the guest can balloon out and free the > nominated GFN, after which the pr

[Xen-devel] [xen-4.9-testing test] 133435: trouble: blocked/broken/pass

2019-02-27 Thread osstest service owner
flight 133435 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/133435/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-prev broken build-amd64-xsm

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

2019-02-27 Thread osstest service owner
flight 133459 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/133459/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 8b8d6f8a3beea391b1ec39ac347ef69501b44019 baseline version: ovmf c417c1b33d06ef6ae96ad

[Xen-devel] [linux-3.18 test] 133433: trouble: blocked/broken

2019-02-27 Thread osstest service owner
flight 133433 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/133433/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-arm64

[Xen-devel] [PATCH] xen-netback: fix occasional leak of grant ref mappings under memory pressure

2019-02-27 Thread Igor Druzhinin
Zero-copy callback flag is not yet set on frag list skb at the moment xenvif_handle_frag_list() returns -ENOMEM. This eventually results in leaking grant ref mappings since xenvif_zerocopy_callback() is never called for these fragments. Those eventually build up and cause Xen to kill Dom0 as the sl

[Xen-devel] [linux-4.19 test] 133431: regressions - trouble: blocked/broken/fail/pass

2019-02-27 Thread osstest service owner
flight 133431 linux-4.19 real [real] http://logs.test-lab.xenproject.org/osstest/logs/133431/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops broken test-arm64-arm64-xl-credit1

[Xen-devel] [linux-4.9 test] 133429: regressions - trouble: blocked/broken/fail/pass

2019-02-27 Thread osstest service owner
flight 133429 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/133429/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win10-i386 broken test-amd64-amd64-xl

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Stefano Stabellini
On Wed, 27 Feb 2019, Jan Beulich wrote: > >>> On 26.02.19 at 19:43, wrote: > > On Tue, 26 Feb 2019, Ian Jackson wrote: > >> Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): > >> > On 26.02.19 at 17:46, wrote: > >> > > I am not aware of a standard C type which could be used

Re: [Xen-devel] [RFC PATCH 0/4] Add missing default labels to switch statements

2019-02-27 Thread Stefano Stabellini
On Wed, 27 Feb 2019, Lars Kurth wrote: > > On 27 Feb 2019, at 10:16, Jan Beulich wrote: > > > On 27.02.19 at 10:23, wrote: > >> > >> I recall that I read in an earlier thread that Julien and Stefano have > >> access to the document, which would leave Jan and a few members of Citrix > >>

[Xen-devel] [xen-unstable test] 133418: regressions - trouble: blocked/broken/fail/pass

2019-02-27 Thread osstest service owner
flight 133418 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/133418/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-3 broken test-amd64-amd64-xl-qemut-ws16-amd64

Re: [Xen-devel] [PATCH 1/6] xen: extend XEN_DOMCTL_memory_mapping to handle cacheability

2019-02-27 Thread Julien Grall
Hi Stefano, On 2/26/19 11:07 PM, Stefano Stabellini wrote: struct xen_domctl_memory_mapping { uint64_aligned_t first_gfn; /* first page (hvm guest phys page) in range */ uint64_aligned_t first_mfn; /* first page (machine page) in range */ uint64_aligned_t nr_mfns; /* numbe

[Xen-devel] [libvirt test] 133428: regressions - trouble: blocked/broken/fail/pass

2019-02-27 Thread osstest service owner
flight 133428 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/133428/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf-pvops

Re: [Xen-devel] XEN on R-CAR H3

2019-02-27 Thread Oleksandr
Hi, Amit BTW, we use mkimage tool to create Xen image to be loaded: mkimage -A arm64 -C none -T kernel -a 0x7808 -e 0x7808 -n "XEN" xen/xen xen-uImage I am sorry, I had missed "-d" key before xen image. The proper command is: mkimage -A arm64 -C none -T kernel -a 0x7808 -e

Re: [Xen-devel] [PATCH 3/6] libxl/xl: add cacheability option to iomem

2019-02-27 Thread Julien Grall
Hi Stefano, On 2/26/19 11:07 PM, Stefano Stabellini wrote: Parse a new cacheability option for the iomem parameter, it can be "devmem" for device memory mappings, which is the default, or "memory" for normal memory mappings. Store the parameter in a new field in libxl_iomem_range. Pass the cac

Re: [Xen-devel] [PATCH 1/6] xen: extend XEN_DOMCTL_memory_mapping to handle cacheability

2019-02-27 Thread Julien Grall
Hi Stefano, On 2/26/19 11:07 PM, Stefano Stabellini wrote: Reuse the existing padding field to pass cacheability information about the memory mapping, specifically, whether the memory should be mapped as normal memory or as device memory (this is what we have today). Add a cacheability paramete

Re: [Xen-devel] [PATCH] drm: add func to better detect wether swiotlb is needed

2019-02-27 Thread Konrad Rzeszutek Wilk
.snip.. > > -u64 drm_get_max_iomem(void) > > +bool drm_need_swiotlb(int dma_bits) > > { > > struct resource *tmp; > > resource_size_t max_iomem = 0; > > > > + /* > > +* Xen paravirtual hosts require swiotlb regardless of requested dma > > +* transfer size. > > +* > > +*

Re: [Xen-devel] [RESEND PATCH 0/7] Add FOLL_LONGTERM to GUP fast and use it

2019-02-27 Thread Ira Weiny
On Tue, Feb 19, 2019 at 09:30:33PM -0800, 'Ira Weiny' wrote: > From: Ira Weiny > > Resending these as I had only 1 minor comment which I believe we have covered > in this series. I was anticipating these going through the mm tree as they > depend on a cleanup patch there and the IB changes are v

Re: [Xen-devel] [PATCH for-4.12 RFC] xen/console: Handle NUL character in buffer sent via CONSOLEIO_write

2019-02-27 Thread Julien Grall
Hi Wei, On 2/27/19 12:55 PM, Wei Liu wrote: On Tue, Feb 26, 2019 at 11:03:51PM +, Julien Grall wrote: After upgrading Debian to Buster, I started noticing console mangling when using zsh. This is happenning because output sent by zsh to the console may contain NUL character in the middle of

[Xen-devel] [ovmf test] 133445: trouble: blocked/broken

2019-02-27 Thread osstest service owner
flight 133445 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/133445/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-pvopsbroken build-i386-pvops

[Xen-devel] [linux-next test] 133420: regressions - trouble: blocked/broken/fail/pass

2019-02-27 Thread osstest service owner
flight 133420 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/133420/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-vhd broken test-amd64-amd64-xl-pvhv2-amd

Re: [Xen-devel] [PATCH 1/3] mwait-idle: add support for using halt

2019-02-27 Thread Woods, Brian
On 2/27/19 7:47 AM, Wei Liu wrote: > On Mon, Feb 25, 2019 at 08:23:58PM +, Woods, Brian wrote: >> Some AMD processors can use a mixture of mwait and halt for accessing >> various c-states. In preparation for adding support for AMD processors, >> update the mwait-idle driver to optionally use h

Re: [Xen-devel] Preparing for Xen Project GSoC applications : Deadline Feb 6

2019-02-27 Thread Lars Kurth
Hi all, looking through the list of GSoC orgs, the following orgs that sometimes have Xen related projects have been accepted into GSoC this year: * https://wiki.freebsd.org/SummerOfCodeIdeas * https://gsoc.honeynet.org/ * https://elinux.org/BeagleBoard/GSoC/Ideas [there is a Xen specific proposa

Re: [Xen-devel] [RFC PATCH 0/4] Add missing default labels to switch statements

2019-02-27 Thread Lars Kurth
> On 27 Feb 2019, at 10:16, Jan Beulich wrote: > On 27.02.19 at 10:23, wrote: >> >> I recall that I read in an earlier thread that Julien and Stefano have >> access to the document, which would leave Jan and a few members of Citrix >> staff. Can those committers who need access raise t

Re: [Xen-devel] [OSSTEST PATCH] jessie: Drop use of jessie-updates

2019-02-27 Thread Juergen Groß
On 2/27/19 12:46 PM, Ian Jackson wrote: The Release file is out of date on our mirror, due to jessie's retirement into LTS. CC: Juergen Gross Signed-off-by: Ian Jackson Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing list Xen-deve

Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Juergen Groß
On 2/27/19 11:46 AM, Andrew Cooper wrote: On 27/02/2019 10:33, Christian Lindig wrote: Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids fd 0 being reused and potentially written to. Signed-off-by: Christian Lindig Possibly worth noting that this fixes a bug whereby /d

Re: [Xen-devel] [PATCH 0/3] mwait support for AMD processors

2019-02-27 Thread Woods, Brian
On 2/27/19 2:51 AM, Jan Beulich wrote: On 26.02.19 at 17:54, wrote: >> On 2/26/19 10:37 AM, Jan Beulich wrote: >> On 26.02.19 at 17:25, wrote: Correct me if I'm wrong, but the Xen's acpi-idle implementation is dependent on dom0 using a AML interpreter and then giving that data

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

2019-02-27 Thread osstest service owner
flight 133457 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/133457/ 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 1

[Xen-devel] [PATCH L1TF v9 6/7] x86/hvm: add nospec to hvmop param

2019-02-27 Thread Norbert Manthey
The params array in hvm can be accessed with get and set functions. As the index is guest controlled, make sure no out-of-bound accesses can be performed. As we cannot influence how future compilers might modify the instructions that enforce the bounds, we furthermore block speculation, so that th

[Xen-devel] [PATCH L1TF v9 5/7] common/memory: block speculative out-of-bound accesses

2019-02-27 Thread Norbert Manthey
The get_page_from_gfn method returns a pointer to a page that belongs to a gfn. Before returning the pointer, the gfn is checked for being valid. Under speculation, these checks can be bypassed, so that the function get_page is still executed partially. Consequently, the function page_get_owner_and

[Xen-devel] [PATCH L1TF v9 7/7] common/grant_table: block speculative out-of-bound accesses

2019-02-27 Thread Norbert Manthey
Guests can issue grant table operations and provide guest controlled data to them. This data is also used for memory loads. To avoid speculative out-of-bound accesses, we use the array_index_nospec macro where applicable. However, there are also memory accesses that cannot be protected by a single

[Xen-devel] [PATCH L1TF v9 4/7] is_hvm/pv_domain: block speculation

2019-02-27 Thread Norbert Manthey
When checking for being an hvm domain, or PV domain, we have to make sure that speculation cannot bypass that check, and eventually access data that should not end up in cache for the current domain type. This is part of the speculative hardening effort. Signed-off-by: Norbert Manthey Acked-by:

[Xen-devel] [PATCH L1TF v9 3/7] is_control_domain: block speculation

2019-02-27 Thread Norbert Manthey
Checks of domain properties, such as is_hardware_domain or is_hvm_domain, might be bypassed by speculatively executing these instructions. A reason for bypassing these checks is that these macros access the domain structure via a pointer, and check a certain field. Since this memory access is slow,

[Xen-devel] [PATCH L1TF v9 2/7] nospec: introduce evaluate_nospec

2019-02-27 Thread Norbert Manthey
Since the L1TF vulnerability of Intel CPUs, loading hypervisor data into L1 cache is problematic, because when hyperthreading is used as well, a guest running on the sibling core can leak this potentially secret data. To prevent these speculative accesses, we block speculation after accessing the

[Xen-devel] [PATCH L1TF v9 1/7] spec: add l1tf-barrier

2019-02-27 Thread Norbert Manthey
To control the runtime behavior on L1TF vulnerable platforms better, the command line option l1tf-barrier is introduced. This option controls whether on vulnerable x86 platforms the lfence instruction is used to prevent speculative execution from bypassing the evaluation of conditionals that are pr

[Xen-devel] L1TF Patch Series v8

2019-02-27 Thread Norbert Manthey
This patch series attempts to mitigate the issue that have been raised in the XSA-289 (https://xenbits.xen.org/xsa/advisory-289.html). To block speculative execution on Intel hardware, an lfence instruction is required to make sure that selected checks are not bypassed. Speculative out-of-bound acc

Re: [Xen-devel] [PATCH v4.1 4/6] xen/x86: Allow stubdom access to irq created for msi.

2019-02-27 Thread Marek Marczykowski
On Wed, Feb 27, 2019 at 04:07:54AM -0700, Jan Beulich wrote: > >>> On 08.02.19 at 11:17, wrote: > > There is one code path where I haven't managed to properly extract > > possible stubdomain in use: > > pci_remove_device() > > -> pci_cleanup_msi() > >-> msi_free_irqs() > > -> msi_free_ir

Re: [Xen-devel] [PATCH v4 5/6] xen/x86: add PHYSDEVOP_msi_set_enable

2019-02-27 Thread Marek Marczykowski
On Wed, Feb 27, 2019 at 04:41:37AM -0700, Jan Beulich wrote: > >>> On 07.02.19 at 01:07, wrote: > > --- a/xen/arch/x86/msi.c > > +++ b/xen/arch/x86/msi.c > > @@ -1474,6 +1474,30 @@ int pci_restore_msi_state(struct pci_dev *pdev) > > return 0; > > } > > > > +int msi_msix_set_enable(struct p

Re: [Xen-devel] [PATCH v6 5/5] npt/shadow: allow getting foreign page table entries

2019-02-27 Thread Wei Liu
On Wed, Feb 27, 2019 at 12:09:05PM +0100, Roger Pau Monne wrote: > Current npt and shadow code to get an entry will always return > INVALID_MFN for foreign entries. Allow to return the entry mfn for > foreign entries, like it's done for grant table entries. > > Signed-off-by: Roger Pau Monné > Re

Re: [Xen-devel] [PATCH v6 4/5] x86/mm: handle foreign mappings in p2m_entry_modify

2019-02-27 Thread Wei Liu
On Wed, Feb 27, 2019 at 12:09:04PM +0100, Roger Pau Monne wrote: > So that the specific handling can be removed from > atomic_write_ept_entry and be shared with npt and shadow code. > > This commit also removes the check that prevent non-ept PVH dom0 from > mapping foreign pages. > > Signed-off-b

Re: [Xen-devel] [PATCH v6.1 3/5] p2m: change write_p2m_entry to return an error code

2019-02-27 Thread Wei Liu
On Wed, Feb 27, 2019 at 12:30:31PM +0100, Roger Pau Monne wrote: > This is in preparation for also changing p2m_entry_modify to return an > error code. > > No functional change intended. > > Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu ___ Xe

Re: [Xen-devel] [PATCH 1/3] mwait-idle: add support for using halt

2019-02-27 Thread Wei Liu
On Mon, Feb 25, 2019 at 08:23:58PM +, Woods, Brian wrote: > Some AMD processors can use a mixture of mwait and halt for accessing > various c-states. In preparation for adding support for AMD processors, > update the mwait-idle driver to optionally use halt. > > Signed-off-by: Brian Woods >

[Xen-devel] [freebsd-master test] 133455: all pass - PUSHED

2019-02-27 Thread osstest service owner
flight 133455 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/133455/ Perfect :-) All tests in this flight passed as required version targeted for testing: freebsd 001b002f2baadcb1f78e1e2c74716f976ed6b6ed baseline version: freebsd 559f0dfc7a5

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

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

Re: [Xen-devel] [PATCH L1TF v8 9/9] common/grant_table: block speculative out-of-bound accesses

2019-02-27 Thread Norbert Manthey
On 2/25/19 17:46, Jan Beulich wrote: On 25.02.19 at 14:34, wrote: >> @@ -634,14 +649,24 @@ static unsigned int nr_grant_entries(struct >> grant_table *gt) >> case 1: >> BUILD_BUG_ON(f2e(INITIAL_NR_GRANT_FRAMES, 1) < >> GNTTAB_NR_RESERVED_ENTRIES); >> + >>

Re: [Xen-devel] [PATCH for-4.12 RFC] xen/console: Handle NUL character in buffer sent via CONSOLEIO_write

2019-02-27 Thread Wei Liu
On Wed, Feb 27, 2019 at 03:25:22AM -0700, Jan Beulich wrote: > >>> On 27.02.19 at 00:03, wrote: > > After upgrading Debian to Buster, I started noticing console mangling > > when using zsh. This is happenning because output sent by zsh to the > > console may contain NUL character in the middle of

Re: [Xen-devel] [PATCH for-4.12 RFC] xen/console: Handle NUL character in buffer sent via CONSOLEIO_write

2019-02-27 Thread Wei Liu
On Tue, Feb 26, 2019 at 11:03:51PM +, Julien Grall wrote: > After upgrading Debian to Buster, I started noticing console mangling > when using zsh. This is happenning because output sent by zsh to the > console may contain NUL character in the middle of the buffer. > > Linux is sending the buf

[Xen-devel] [xen-4.10-testing test] 133419: regressions - trouble: blocked/broken/fail/pass

2019-02-27 Thread osstest service owner
flight 133419 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/133419/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-win10-i386 broken test-amd64-amd64-libvirt-qemu

Re: [Xen-devel] [PATCH v2 3/3] tools/cpu-policy: Add unit tests

2019-02-27 Thread Wei Liu
On Mon, Feb 25, 2019 at 03:47:15PM +, Andrew Cooper wrote: > These will be extended with further libx86 work. > > Fix the sorting of the CPUID_GUEST_NR_* constants, noticed while writing the > unit tests. > > Signed-off-by: Andrew Cooper Looks good to me. But I will let you and Jan figure o

Re: [Xen-devel] [PATCH v2 2/3] libx86: Introduce a helper to deserialise cpuid_policy objects

2019-02-27 Thread Wei Liu
On Mon, Feb 25, 2019 at 03:47:14PM +, Andrew Cooper wrote: > Signed-off-by: Andrew Cooper > Signed-off-by: Sergey Dyasli > Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://list

Re: [Xen-devel] [PATCH v2 1/3] libx86: introduce a helper to deserialise msr_policy objects

2019-02-27 Thread Wei Liu
On Mon, Feb 25, 2019 at 03:47:13PM +, Andrew Cooper wrote: > + > +switch ( data.idx ) > +{ > +/* > + * Assign data.val to 'field', checking for truncation if the > + * backing storage for 'field' is smaller than uint64_t > + */ > +

Re: [Xen-devel] [PATCH for-4.12] tools/tests: Drop obsolete test infrastructure

2019-02-27 Thread Wei Liu
On Mon, Feb 25, 2019 at 01:16:19PM +, Andrew Cooper wrote: > The regression/ directory was identified as already broken in 2012 (c/s > 953953cc5). The logic is intended to test *.py files in the Xen tree against > different versions of python, but every identified version is now obsolete. > >

Re: [Xen-devel] [PATCH v4] x86/nmi: correctly check MSB of P6 performance counter MSR in watchdog

2019-02-27 Thread Igor Druzhinin
On 27/02/2019 10:02, Jan Beulich wrote: > > Reviewed-by: Jan Beulich > albeit ... > >> @@ -323,6 +326,15 @@ static void setup_p6_watchdog(unsigned counter) >> unsigned int evntsel; >> >> nmi_perfctr_msr = MSR_P6_PERFCTR(0); >> +if ( !nmi_p6_event_width ) >> +nmi_p6_ev

Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Wei Liu
On Wed, Feb 27, 2019 at 10:33:42AM +, Christian Lindig wrote: > Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids > fd 0 being reused and potentially written to. > > Signed-off-by: Christian Lindig Acked-by: Wei Liu ___ Xen

Re: [Xen-devel] [OSSTEST PATCH] jessie: Drop use of jessie-updates

2019-02-27 Thread Ian Jackson
Ian Jackson writes ("[OSSTEST PATCH] jessie: Drop use of jessie-updates"): > The Release file is out of date on our mirror, due to jessie's > retirement into LTS. This is causing everything to break. The self-test flight is `sort of OK' although it does show what I think are hardware problems. I

[Xen-devel] [PATCH for-4.12] x86/dom0: propagate PVH vlapic EOIs to hardware

2019-02-27 Thread Roger Pau Monne
Current check for MSI EIO is missing a special case for PVH Dom0, which doesn't have a hvm_irq_dpci struct but requires EIOs to be forwarded to the physical lapic for passed-through devices. Add a short-circuit to allow EOIs from PVH Dom0 to be propagated. Signed-off-by: Roger Pau Monné --- Cc:

[Xen-devel] [OSSTEST PATCH] jessie: Drop use of jessie-updates

2019-02-27 Thread Ian Jackson
The Release file is out of date on our mirror, due to jessie's retirement into LTS. CC: Juergen Gross Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index c5dc0e61..59c60d40 100644 ---

Re: [Xen-devel] [PATCH v4 5/6] xen/x86: add PHYSDEVOP_msi_set_enable

2019-02-27 Thread Jan Beulich
>>> On 07.02.19 at 01:07, wrote: > --- a/xen/arch/x86/msi.c > +++ b/xen/arch/x86/msi.c > @@ -1474,6 +1474,30 @@ int pci_restore_msi_state(struct pci_dev *pdev) > return 0; > } > > +int msi_msix_set_enable(struct pci_dev *pdev, int mode, int enable) unsigned int mode, bool enable I'm also

[Xen-devel] [distros-debian-squeeze test] 83674: trouble: blocked/broken

2019-02-27 Thread Platform Team regression test user
flight 83674 distros-debian-squeeze real [real] http://osstest.xensource.com/osstest/logs/83674/ 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] [PATCH v6.1 3/5] p2m: change write_p2m_entry to return an error code

2019-02-27 Thread Roger Pau Monne
This is in preparation for also changing p2m_entry_modify to return an error code. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Tim Deegan --- Changes since v6: - Fix line wrapping in p2m_next_level.

Re: [Xen-devel] [PATCH for-4.12] x86: Improve the efficiency of domain_relinquish_resources()

2019-02-27 Thread Julien Grall
Hi Andrew, On 2/21/19 12:22 PM, Andrew Cooper wrote: pci_release_devices() takes the global PCI lock. Once pci_release_devices() has completed, it will be called redundantly each time paging_teardown() and vcpu_destroy_pagetables() continue. This is liable to be millions of times for a reasona

Re: [Xen-devel] xen/evtchn and forced threaded irq

2019-02-27 Thread Julien Grall
Hi, On 2/26/19 11:02 AM, Roger Pau Monné wrote: On Tue, Feb 26, 2019 at 10:26:21AM +, Julien Grall wrote: On 26/02/2019 10:17, Roger Pau Monné wrote: On Tue, Feb 26, 2019 at 10:03:38AM +, Julien Grall wrote: Hi Roger, On 26/02/2019 09:44, Roger Pau Monné wrote: On Tue, Feb 26, 2019

[Xen-devel] [PATCH v6 2/5] x86/mm: split p2m ioreq server pages special handling into helper

2019-02-27 Thread Roger Pau Monne
So that it can be shared by both ept, npt and shadow code, instead of duplicating it. No change in functionality intended. Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durrant Reviewed-by: George Dunlap Reviewed-by: Kevin Tian --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc:

[Xen-devel] [PATCH v6 1/5] x86/p2m: pass the p2m to write_p2m_entry handlers

2019-02-27 Thread Roger Pau Monne
Current callers pass the p2m to paging_write_p2m_entry, but the implementation specific handlers of the write_p2m_entry hook instead of a p2m get a domain struct due to the handling done in paging_write_p2m_entry. Change the code so that the implementations of write_p2m_entry take a p2m instead of

[Xen-devel] [PATCH v6 5/5] npt/shadow: allow getting foreign page table entries

2019-02-27 Thread Roger Pau Monne
Current npt and shadow code to get an entry will always return INVALID_MFN for foreign entries. Allow to return the entry mfn for foreign entries, like it's done for grant table entries. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Co

[Xen-devel] [PATCH v6 4/5] x86/mm: handle foreign mappings in p2m_entry_modify

2019-02-27 Thread Roger Pau Monne
So that the specific handling can be removed from atomic_write_ept_entry and be shared with npt and shadow code. This commit also removes the check that prevent non-ept PVH dom0 from mapping foreign pages. Signed-off-by: Roger Pau Monné Reviewed-by: Kevin Tian --- Cc: George Dunlap Cc: Jan Beu

[Xen-devel] [PATCH v6 0/5] pvh/dom0/shadow/amd fixes

2019-02-27 Thread Roger Pau Monne
The remaining set of patches contain changes to the p2m code that could affect HVM guests. Note that without those changes a PVH dom0 running on AMD hardware will be unable to create guests. Overall the patches are a nice cleanup to the handling of p2m_ioreq_server and p2m_map_foreign types IMO. T

[Xen-devel] [PATCH v6 3/5] p2m: change write_p2m_entry to return an error code

2019-02-27 Thread Roger Pau Monne
This is in preparation for also changing p2m_entry_modify to return an error code. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Tim Deegan --- Changes since v5: - Return -EOPNOTSUPP from _write_p2m_ent

Re: [Xen-devel] [PATCH v4.1 4/6] xen/x86: Allow stubdom access to irq created for msi.

2019-02-27 Thread Jan Beulich
>>> On 08.02.19 at 11:17, wrote: > There is one code path where I haven't managed to properly extract > possible stubdomain in use: > pci_remove_device() > -> pci_cleanup_msi() >-> msi_free_irqs() > -> msi_free_irq() >-> destroy_irq() > > For now I've hardcoded hardware_domain t

Re: [Xen-devel] XEN on R-CAR H3

2019-02-27 Thread Julien Grall
Hi Amit, On 2/21/19 6:15 PM, Amit Tomer wrote: Hi, diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d9836779d1..08b9cd2c44 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1805,6 +1805,8 @@ static void __init dtb_load(struct kernel_info

Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Andrew Cooper
On 27/02/2019 10:33, Christian Lindig wrote: > Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids > fd 0 being reused and potentially written to. > > Signed-off-by: Christian Lindig Possibly worth noting that this fixes a bug whereby /dev/xen/evtchn reliably gets opened on f

Re: [Xen-devel] [PATCH for-4.12 RFC] xen/console: Handle NUL character in buffer sent via CONSOLEIO_write

2019-02-27 Thread Julien Grall
(+ Juergen Gross as RM) I forgot to CC Juergen for this. On 2/26/19 11:03 PM, Julien Grall wrote: After upgrading Debian to Buster, I started noticing console mangling when using zsh. This is happenning because output sent by zsh to the console may contain NUL character in the middle of the buf

Re: [Xen-devel] [PATCH for-4.12 RFC] xen/console: Handle NUL character in buffer sent via CONSOLEIO_write

2019-02-27 Thread Julien Grall
Hi, On 2/27/19 10:25 AM, Jan Beulich wrote: On 27.02.19 at 00:03, wrote: After upgrading Debian to Buster, I started noticing console mangling when using zsh. This is happenning because output sent by zsh to the console may contain NUL character in the middle of the buffer. Linux is sending t

Re: [Xen-devel] [PATCH 1/6] xen: extend XEN_DOMCTL_memory_mapping to handle cacheability

2019-02-27 Thread Jan Beulich
>>> On 27.02.19 at 00:07, wrote: > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -571,12 +571,14 @@ struct xen_domctl_bind_pt_irq { > */ > #define DPCI_ADD_MAPPING 1 > #define DPCI_REMOVE_MAPPING 0 > +#define CACHEABILITY_DEVMEM 0 /* device memory,

[Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Christian Lindig
Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids fd 0 being reused and potentially written to. Signed-off-by: Christian Lindig --- tools/ocaml/xenstored/stdext.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/xenstored/stdext.ml b/too

Re: [Xen-devel] [PATCH for-4.12 RFC] xen/console: Handle NUL character in buffer sent via CONSOLEIO_write

2019-02-27 Thread Jan Beulich
>>> On 27.02.19 at 00:03, wrote: > After upgrading Debian to Buster, I started noticing console mangling > when using zsh. This is happenning because output sent by zsh to the > console may contain NUL character in the middle of the buffer. > > Linux is sending the buffer as it is to Xen console

Re: [Xen-devel] [RFC PATCH 0/4] Add missing default labels to switch statements

2019-02-27 Thread Jan Beulich
>>> On 27.02.19 at 10:23, wrote: > >> On 26 Feb 2019, at 18:27, Stefano Stabellini wrote: >> >> On Tue, 26 Feb 2019, Jan Beulich wrote: So, we'll end up having lots of macros then which is obviously not good. That said, I hope we can work out some common approach not only to thi

Re: [Xen-devel] [PATCH v4] x86/nmi: correctly check MSB of P6 performance counter MSR in watchdog

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 18:44, wrote: > The logic currently tries to work out if a recent overflow (that indicates > that NMI comes from the watchdog) happened by checking MSB of performance > counter MSR that is initially sign extended from a negative value > that we program it to. A possibly incorrec

Re: [Xen-devel] [PATCH v10 3/6] xen/arm: use DEFINE_SYMBOL as required

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 20:20, wrote: > On Tue, 26 Feb 2019, Ian Jackson wrote: >> Having written all that down (what a palaver), we can see that your >> cast, above, is a breach of the rules. Instead you can just pass the >> struct abstract_alt_instr*, and all is well. Then you don't need a >> comme

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 19:43, wrote: > On Tue, 26 Feb 2019, Ian Jackson wrote: >> Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): >> > On 26.02.19 at 17:46, wrote: >> > > I am not aware of a standard C type which could be used instead of >> > > this struct. But I think you c

Re: [Xen-devel] [PATCH v10 4/6] xen/x86: use DEFINE_SYMBOL as required

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 20:23, wrote: > On Tue, 26 Feb 2019, Ian Jackson wrote: >> Stefano Stabellini writes ("[PATCH v10 4/6] xen/x86: use DEFINE_SYMBOL as >> required"): >> > Use SYMBOLS_SUBTRACT and SYMBOLS_COMPARE in cases of comparisons and >> > subtractions of: >> ... >> > Use explicit casts to

Re: [Xen-devel] [RFC PATCH 0/4] Add missing default labels to switch statements

2019-02-27 Thread Lars Kurth
> On 26 Feb 2019, at 18:27, Stefano Stabellini wrote: > > On Tue, 26 Feb 2019, Jan Beulich wrote: >>> So, we'll end up having lots of macros then which is obviously >>> not good. That said, I hope we can work out some common approach >>> not only to this issue, but how we deal with such in gene

Re: [Xen-devel] [PATCH 0/3] mwait support for AMD processors

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 17:54, wrote: > On 2/26/19 10:37 AM, Jan Beulich wrote: > On 26.02.19 at 17:25, wrote: >>> Correct me if I'm wrong, but the Xen's acpi-idle implementation is >>> dependent on dom0 using a AML interpreter and then giving that data back >>> to Xen. I've heard that this doesn

Re: [Xen-devel] [PATCH v10 6/6] xen: use DEFINE_SYMBOL as required

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 22:22, wrote: > On Tue, 26 Feb 2019, Jan Beulich wrote: >> >>> On 25.02.19 at 21:50, wrote: >> > @@ -210,7 +210,8 @@ static int __apply_alternatives_multi_stop(void >> > *unused) >> > region.begin = __alt_instructions; >> > region.end = (struct alt_instr *)__

Re: [Xen-devel] [PATCH v10 5/6] xen/common: use DEFINE_SYMBOL as required

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 22:14, wrote: > On Tue, 26 Feb 2019, Jan Beulich wrote: >> >>> On 25.02.19 at 21:50, wrote: >> > --- a/xen/common/lib.c >> > +++ b/xen/common/lib.c >> > @@ -492,12 +492,15 @@ unsigned long long parse_size_and_unit(const char >> > *s, >> > const char **ps) >> > } >> > >> >

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 19:54, wrote: > On Tue, 26 Feb 2019, Jan Beulich wrote: >> >>> On 25.02.19 at 21:50, wrote: >> > --- a/xen/include/xen/compiler.h >> > +++ b/xen/include/xen/compiler.h >> > @@ -99,6 +99,38 @@ >> > __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ >> > (typeof(ptr)) (__ptr

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 18:32, wrote: > Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): >> On 26.02.19 at 17:46, wrote: >> > I am not aware of a standard C type which could be used instead of >> > this struct. But I think you can use the `packed' attribute to get >> > the rig