[Xen-devel] [linux-3.18 test] 130549: regressions - trouble: blocked/broken/fail/pass

2018-11-21 Thread osstest service owner
flight 130549 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/130549/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-pvops

Re: [Xen-devel] [PATCH v1 3/8] kexec: export PG_offline to VMCOREINFO

2018-11-21 Thread David Hildenbrand
On 21.11.18 07:04, Baoquan He wrote: > On 11/19/18 at 11:16am, David Hildenbrand wrote: >> diff --git a/kernel/crash_core.c b/kernel/crash_core.c >> index 933cb3e45b98..093c9f917ed0 100644 >> --- a/kernel/crash_core.c >> +++ b/kernel/crash_core.c >> @@ -464,6 +464,8 @@ static int __init crash_save_

Re: [Xen-devel] [PATCH v4 11/19] xen: get memory map from hypervisor for PVH

2018-11-21 Thread Juergen Gross
On 15/11/2018 10:36, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:30PM +0100, Juergen Gross wrote: >> Retrieve the memory map from the hypervisor and normalize it to contain >> no overlapping entries and to be sorted by address. >> >> Signed-off-by: Juergen Gross >> --- >> V3: use grub_e

Re: [Xen-devel] [PATCH v1 6/8] vmw_balloon: mark inflated pages PG_offline

2018-11-21 Thread David Hildenbrand
On 21.11.18 04:22, Nadav Amit wrote: > Thanks for this patch! > >> On Nov 19, 2018, at 2:16 AM, David Hildenbrand wrote: >> >> Mark inflated and never onlined pages PG_offline, to tell the world that >> the content is stale and should not be dumped. >> >> Cc: Xavier Deguillard >> Cc: Nadav Amit

Re: [Xen-devel] [PATCH v4 12/19] xen: add PCI MMIO areas to memory map

2018-11-21 Thread Juergen Gross
On 14/11/2018 13:48, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:31PM +0100, Juergen Gross wrote: >> Add possible PCI space MMIO areas as "Reserved" to the memory map in >> order to avoid using those areas for special Xen pages later. > > TBH, I'm not sure this is the best way to solve

Re: [Xen-devel] [PATCH v4 13/19] xen: setup Xen specific data for PVH

2018-11-21 Thread Juergen Gross
On 15/11/2018 11:03, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:32PM +0100, Juergen Gross wrote: >> Initialize the needed Xen specific data. This is: >> >> - the Xen start of day page containing the console and Xenstore ring >> page PFN and event channel >> - the grant table >> - the

Re: [Xen-devel] [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract

2018-11-21 Thread Igor Mammedov
On Tue, 20 Nov 2018 19:54:23 +0100 Laszlo Ersek wrote: > On 11/20/18 17:33, Igor Mammedov wrote: > > On Wed, 7 Nov 2018 16:36:40 +0400 > > Marc-André Lureau wrote: > > > >> Interfaces don't have instance, let's make the interface type really > >> abstract to avoid confusion. > >> > >> Signed

Re: [Xen-devel] [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 00:26, wrote: > The original commit 0af438757d455f8eb6b5a6ae9a990ae245f230fd > > The commit that adds is_hardware_domain (and rearrange things) > 7c275549f46c5c46611592f7107c1345e93ed457 > > The orginal commit used the function like > setup_dom0_pci_devices(d, amd_iommu_setup_

Re: [Xen-devel] [PATCH v1] x86/dom0: use MEMF_no_scrub for Dom0 RAM allocation

2018-11-21 Thread Sergey Dyasli
On 20/11/2018 17:16, Jan Beulich wrote: On 20.11.18 at 18:00, wrote: >> Now that idle scrub is the default option, all memory is marked as dirty >> and alloc_domheap_pages() will do eager scrubbing by default. This can >> lead to longer Dom0 construction and potentially to a watchdog timeout,

Re: [Xen-devel] [PATCH 3/4] x86: reduce code duplication in guest_remove_page()

2018-11-21 Thread Jan Beulich
>>> On 20.11.18 at 18:06, wrote: > On 20/11/2018 16:19, Jan Beulich wrote: >> Quite a bit of duplicate code has accumulated on the "paging" types >> special case path. Re-use what can be re-used from the common path. >> >> Since it needs touching anyway, slightly re-format and extend the >> gdprin

[Xen-devel] [distros-debian-squeeze test] 75616: tolerable FAIL

2018-11-21 Thread Platform Team regression test user
flight 75616 distros-debian-squeeze real [real] http://osstest.xensource.com/osstest/logs/75616/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-i386-squeeze-netboot-pygrub 10 debian-di-install fail like 75592 test-amd64-amd64-amd64-squeeze-n

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

2018-11-21 Thread osstest service owner
flight 130641 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/130641/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-amd64 6 xen

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-21 Thread Roger Pau Monné
On Mon, Nov 19, 2018 at 03:56:14PM +, Alexandru Stefan ISAILA wrote: > > > On 19.11.2018 17:08, Roger Pau Monné wrote: > > On Mon, Nov 19, 2018 at 01:30:09PM +, Alexandru Stefan ISAILA wrote: > +/* Now transform our RWX values in a XENMEM_access_* constant. */ > +if ( r

Re: [Xen-devel] [PATCH] x86/mem_access: move p2m_mem_access_sanity_check() from header

2018-11-21 Thread Jan Beulich
>>> On 20.11.18 at 19:05, wrote: > --- a/xen/arch/x86/mm/mem_access.c > +++ b/xen/arch/x86/mm/mem_access.c > @@ -541,6 +541,11 @@ void arch_p2m_set_access_required(struct domain *d, bool > access_required) > #endif > } > > +bool p2m_mem_access_sanity_check(struct domain *d) > +{ > +return

[Xen-devel] [faster-by-no-jump-table] retpoline: disable jump tables

2018-11-21 Thread Norbert Manthey
On 11/20/18 17:37, Andrew Cooper wrote: > On 20/11/2018 15:49, Jan Beulich wrote: > On 20.11.18 at 16:37, wrote: >>> To mitigate Meltdown, Xen has been fixed with a software fix, namely >>> using retpoline sequences generated by the compiler. This way, indirect >>> branches are protected again

Re: [Xen-devel] [faster-by-no-jump-table] retpoline: disable jump tables

2018-11-21 Thread Andrew Cooper
On 21/11/2018 10:05, Norbert Manthey wrote: > On 11/20/18 17:37, Andrew Cooper wrote: >> On 20/11/2018 15:49, Jan Beulich wrote: >> On 20.11.18 at 16:37, wrote: To mitigate Meltdown, Xen has been fixed with a software fix, namely using retpoline sequences generated by the compiler. T

[Xen-devel] [qemu-mainline test] 130609: regressions - trouble: blocked/broken/fail/pass

2018-11-21 Thread osstest service owner
flight 130609 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/130609/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvopsbroken build-arm64-xsm

[Xen-devel] [PATCH v2] x86-64/Xen: fix stack switching

2018-11-21 Thread Jan Beulich
While in the native case entry into the kernel happens on the trampoline stack, PV Xen kernels get entered with the current thread stack right away. Hence source and destination stacks are identical in that case, and special care is needed. Other than in sync_regs() the copying done on the INT80 p

Re: [Xen-devel] [PATCH] x86/mem_access: move p2m_mem_access_sanity_check() from header

2018-11-21 Thread Razvan Cojocaru
On 11/21/18 12:00 PM, Jan Beulich wrote: On 20.11.18 at 19:05, wrote: >> --- a/xen/arch/x86/mm/mem_access.c >> +++ b/xen/arch/x86/mm/mem_access.c >> @@ -541,6 +541,11 @@ void arch_p2m_set_access_required(struct domain *d, >> bool access_required) >> #endif >> } >> >> +bool p2m_mem_access

[Xen-devel] [PATCH V8 1/7] x86/mm: introduce p2m_{init, free}_logdirty()

2018-11-21 Thread Razvan Cojocaru
Add logdirty_ranges allocator / deallocator helpers. p2m_init_logdirty() will not re-allocate if p2m->logdirty ranges has already been allocated. Move the rangeset deallocation call from p2m_teardown_hostp2m() to p2m_free_one() - we will want this to apply to altp2ms as well. Signed-off-by: Razva

[Xen-devel] [PATCH V8 7/7] p2m: change_range_type: Only invalidate mapped gfns

2018-11-21 Thread Razvan Cojocaru
change_range_type() invalidates gfn ranges to lazily change the type of a range of gfns, and also modifies the logdirty rangesets of that p2m. At the moment, it clips both down by the hostp2m. While this will result in correct behavior, it's not entirely efficient, since invalidated entries outsid

[Xen-devel] [PATCH V8 3/7] x86/p2m: allocate logdirty_ranges for altp2ms

2018-11-21 Thread Razvan Cojocaru
For now, only do allocation/deallocation; keeping them in sync will be done in subsequent patches. Logdirty synchronization will only be done for active altp2ms; so allocate logdirty rangesets (copying the host logdirty rangeset) when an altp2m is activated, and free it when deactivated. Signed-o

[Xen-devel] [PATCH V8 6/7] p2m: Always use hostp2m when clipping rangesets

2018-11-21 Thread Razvan Cojocaru
The logdirty rangesets of the altp2ms need to be kept in sync with the hostp2m. This means when iterating through the altp2ms, we need to use the host p2m to clip the rangeset, not the indiviual altp2m's value. This change also: - Documents that the end is non-inclusive - Calculates an "inclusi

[Xen-devel] [PATCH V8 5/7] x86/altp2m: fix display frozen when switching to a new view early

2018-11-21 Thread Razvan Cojocaru
When an new altp2m view is created very early on guest boot, the display will freeze (although the guest will run normally). This may also happen on resizing the display. The reason is the way Xen currently (mis)handles logdirty VGA: it intentionally misconfigures VGA pages so that they will fault.

[Xen-devel] [PATCH V8 0/7] Fix VGA logdirty related display freezes with altp2m

2018-11-21 Thread Razvan Cojocaru
This series aims to prevent the display from freezing when enabling altp2m and switching to a new view (and assorted problems when resizing the display). The series introduces p2m_{init,free}_logdirty(), allocates a new logdirty rangeset for each new altp2m, and propagates (under lock) changes to

[Xen-devel] [PATCH V8 4/7] x86/p2m: refactor p2m_reset_altp2m()

2018-11-21 Thread Razvan Cojocaru
Refactor p2m_reset_altp2m() so that it can be used to remove redundant codepaths, fixing the locking while we're at it. Signed-off-by: Razvan Cojocaru --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m.c | 57 ++

[Xen-devel] [PATCH V8 2/7] x86/p2m: switch global_logdirty from bool_t to bool

2018-11-21 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/include/asm-x86/p2m.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index 6d849a5..b52fefd 100644 --- a/x

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-21 Thread Alexandru Stefan ISAILA
On 21.11.2018 11:56, Roger Pau Monné wrote: > On Mon, Nov 19, 2018 at 03:56:14PM +, Alexandru Stefan ISAILA wrote: >> >> >> On 19.11.2018 17:08, Roger Pau Monné wrote: >>> On Mon, Nov 19, 2018 at 01:30:09PM +, Alexandru Stefan ISAILA wrote: >> +/* Now transform our RWX values in a

Re: [Xen-devel] [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables

2018-11-21 Thread Roger Pau Monné
On Wed, Nov 21, 2018 at 02:21:36AM -0700, Jan Beulich wrote: > >>> On 21.11.18 at 00:26, wrote: > > The original commit 0af438757d455f8eb6b5a6ae9a990ae245f230fd > > > > The commit that adds is_hardware_domain (and rearrange things) > > 7c275549f46c5c46611592f7107c1345e93ed457 > > > > The orginal

Re: [Xen-devel] [PATCH v3] tools: set Dom0 UUID if requested

2018-11-21 Thread Sergey Dyasli
On 20/11/2018 18:09, Wei Liu wrote: > Introduce XEN_DOM0_UUID in Xen's global configuration file. Make > xen-init-dom0 accept an extra argument for UUID. > > Signed-off-by: Wei Liu > --- > v3: new approach > --- > tools/helpers/Makefile | 3 +- > tools/helpers/xen-i

Re: [Xen-devel] [PATCH V8 3/7] x86/p2m: allocate logdirty_ranges for altp2ms

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 11:19, wrote: > +static int p2m_activate_altp2m(struct domain *d, unsigned int idx) > +{ > +struct p2m_domain *hostp2m, *p2m; > +int rc; > + > +ASSERT(idx < MAX_ALTP2M); > + > +p2m = d->arch.altp2m_p2m[idx]; > +hostp2m = p2m_get_hostp2m(d); > + > +p2m_loc

Re: [Xen-devel] [PATCH V8 4/7] x86/p2m: refactor p2m_reset_altp2m()

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 11:19, wrote: > Refactor p2m_reset_altp2m() so that it can be used to remove > redundant codepaths, fixing the locking while we're at it. Still no word about ... > +static void p2m_reset_altp2m(struct domain *d, unsigned int idx, > + enum altp2m_res

Re: [Xen-devel] [PATCH V8 3/7] x86/p2m: allocate logdirty_ranges for altp2ms

2018-11-21 Thread Razvan Cojocaru
On 11/21/18 12:45 PM, Jan Beulich wrote: On 21.11.18 at 11:19, wrote: >> +static int p2m_activate_altp2m(struct domain *d, unsigned int idx) >> +{ >> +struct p2m_domain *hostp2m, *p2m; >> +int rc; >> + >> +ASSERT(idx < MAX_ALTP2M); >> + >> +p2m = d->arch.altp2m_p2m[idx]; >> +

Re: [Xen-devel] [PATCH V8 4/7] x86/p2m: refactor p2m_reset_altp2m()

2018-11-21 Thread Razvan Cojocaru
On 11/21/18 12:49 PM, Jan Beulich wrote: On 21.11.18 at 11:19, wrote: >> Refactor p2m_reset_altp2m() so that it can be used to remove >> redundant codepaths, fixing the locking while we're at it. > > Still no word about ... > >> +static void p2m_reset_altp2m(struct domain *d, unsigned int i

Re: [Xen-devel] [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 11:37, wrote: > On Wed, Nov 21, 2018 at 02:21:36AM -0700, Jan Beulich wrote: >> >>> On 21.11.18 at 00:26, wrote: >> > The original commit 0af438757d455f8eb6b5a6ae9a990ae245f230fd >> > >> > The commit that adds is_hardware_domain (and rearrange things) >> > 7c275549f46c5c466115

[Xen-devel] [PATCH] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru --- xen/arch/x86/mm/mem_access.c | 2 +- xen/include/asm-x86/mem_access.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index 30c2f1a..56c06a4 100644 --- a/xen/arch/x86/mm/mem_a

Re: [Xen-devel] [PATCH] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread George Dunlap
On 11/21/18 11:01 AM, Razvan Cojocaru wrote: > Signed-off-by: Razvan Cojocaru Why? -George ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 1/9] mm: Introduce new vm_insert_range API

2018-11-21 Thread William Kucharski
Could you add a line to the description explicitly stating that a failure to insert any page in the range will fail the entire routine, something like: > * This allows drivers to insert range of kernel pages they've allocated > * into a user vma. This is a generic function which drivers can use >

Re: [Xen-devel] [PATCH v1 8/8] PM / Hibernate: exclude all PageOffline() pages

2018-11-21 Thread William Kucharski
If you are adding PageOffline(page) to the condition list of the already existing if in saveable_highmem_page(), why explicitly add it as a separate statement in saveable_page()? It would seem more consistent to make the second check: - if (swsusp_page_is_forbidden(page) || swsusp_page_is

Re: [Xen-devel] [PATCH V8 4/7] x86/p2m: refactor p2m_reset_altp2m()

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 11:57, wrote: > On 11/21/18 12:49 PM, Jan Beulich wrote: > On 21.11.18 at 11:19, wrote: >>> Refactor p2m_reset_altp2m() so that it can be used to remove >>> redundant codepaths, fixing the locking while we're at it. >> >> Still no word about ... >> >>> +static void p2m_re

Re: [Xen-devel] [PATCH] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 12:03, wrote: > On 11/21/18 11:01 AM, Razvan Cojocaru wrote: >> Signed-off-by: Razvan Cojocaru > > Why? Are you asking in general (I think it's obvious), or merely because the commit description is empty? Jan ___ Xen-devel maili

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-21 Thread Roger Pau Monné
On Wed, Nov 21, 2018 at 10:28:18AM +, Alexandru Stefan ISAILA wrote: > > > On 21.11.2018 11:56, Roger Pau Monné wrote: > > On Mon, Nov 19, 2018 at 03:56:14PM +, Alexandru Stefan ISAILA wrote: > >> On 19.11.2018 17:08, Roger Pau Monné wrote: > > Also, after looking at the code I'm not sure

[Xen-devel] [xen-4.8-testing test] 130610: trouble: blocked/broken/fail/pass

2018-11-21 Thread osstest service owner
flight 130610 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/130610/ 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 V8 4/7] x86/p2m: refactor p2m_reset_altp2m()

2018-11-21 Thread George Dunlap
On 11/21/18 10:49 AM, Jan Beulich wrote: On 21.11.18 at 11:19, wrote: >> Refactor p2m_reset_altp2m() so that it can be used to remove >> redundant codepaths, fixing the locking while we're at it. > > Still no word about ... > >> +static void p2m_reset_altp2m(struct domain *d, unsigned int i

Re: [Xen-devel] [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables

2018-11-21 Thread Roger Pau Monné
On Wed, Nov 21, 2018 at 03:58:34AM -0700, Jan Beulich wrote: > >>> On 21.11.18 at 11:37, wrote: > > On Wed, Nov 21, 2018 at 02:21:36AM -0700, Jan Beulich wrote: > >> >>> On 21.11.18 at 00:26, wrote: > >> > The original commit 0af438757d455f8eb6b5a6ae9a990ae245f230fd > >> > > >> > The commit that

Re: [Xen-devel] [PATCH] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread George Dunlap
On 11/21/18 11:41 AM, Jan Beulich wrote: On 21.11.18 at 12:03, wrote: >> On 11/21/18 11:01 AM, Razvan Cojocaru wrote: >>> Signed-off-by: Razvan Cojocaru >> >> Why? > > Are you asking in general (I think it's obvious), or merely because > the commit description is empty? I didn't see that y

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-21 Thread Alexandru Stefan ISAILA
On 21.11.2018 13:41, Roger Pau Monné wrote: > On Wed, Nov 21, 2018 at 10:28:18AM +, Alexandru Stefan ISAILA wrote: >> >> >> On 21.11.2018 11:56, Roger Pau Monné wrote: >>> On Mon, Nov 19, 2018 at 03:56:14PM +, Alexandru Stefan ISAILA wrote: On 19.11.2018 17:08, Roger Pau Monné wrote:

Re: [Xen-devel] [PATCH] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread Razvan Cojocaru
On 11/21/18 1:52 PM, George Dunlap wrote: > On 11/21/18 11:41 AM, Jan Beulich wrote: > On 21.11.18 at 12:03, wrote: >>> On 11/21/18 11:01 AM, Razvan Cojocaru wrote: Signed-off-by: Razvan Cojocaru >>> >>> Why? >> >> Are you asking in general (I think it's obvious), or merely because >> th

[Xen-devel] [PATCH V2] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread Razvan Cojocaru
Minor improvement; simply improving code quality by using consts wherever reasonable. Suggested-by: Jan Beulich Signed-off-by: Razvan Cojocaru --- xen/arch/x86/mm/mem_access.c | 2 +- xen/include/asm-x86/mem_access.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen

Re: [Xen-devel] [PATCH V2] x86/p2m: constify p2m_mem_access_sanity_check()

2018-11-21 Thread George Dunlap
On 11/21/18 12:09 PM, Razvan Cojocaru wrote: > Minor improvement; simply improving code quality by using consts > wherever reasonable. > > Suggested-by: Jan Beulich > Signed-off-by: Razvan Cojocaru Reviewed-by: George Dunlap ___ Xen-devel mailing li

Re: [Xen-devel] [PATCH v1 8/8] PM / Hibernate: exclude all PageOffline() pages

2018-11-21 Thread David Hildenbrand
On 21.11.18 12:35, William Kucharski wrote: > If you are adding PageOffline(page) to the condition list of the already > existing if in > saveable_highmem_page(), why explicitly add it as a separate statement in > saveable_page()? > > It would seem more consistent to make the second check: > >

Re: [Xen-devel] [PATCH 1/9] mm: Introduce new vm_insert_range API

2018-11-21 Thread Matthew Wilcox
On Wed, Nov 21, 2018 at 04:19:11AM -0700, William Kucharski wrote: > Could you add a line to the description explicitly stating that a failure > to insert any page in the range will fail the entire routine, something > like: > > > * This allows drivers to insert range of kernel pages they've alloc

Re: [Xen-devel] [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-21 Thread Michael S. Tsirkin
On Mon, Nov 19, 2018 at 04:31:10PM +0100, Igor Mammedov wrote: > On Fri, 16 Nov 2018 17:37:54 +0100 > Paolo Bonzini wrote: > > > On 16/11/18 17:29, Igor Mammedov wrote: > > > General suggestions for this series: > > > 1. Preferably don't do multiple changes within a patch > > > neither pos

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

2018-11-21 Thread osstest service owner
flight 130651 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/130651/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-amd64 6 xen

Re: [Xen-devel] [PATCH V8 4/7] x86/p2m: refactor p2m_reset_altp2m()

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 12:48, wrote: > On 11/21/18 10:49 AM, Jan Beulich wrote: > On 21.11.18 at 11:19, wrote: >>> Refactor p2m_reset_altp2m() so that it can be used to remove >>> redundant codepaths, fixing the locking while we're at it. >> >> Still no word about ... >> >>> +static void p2m_re

[Xen-devel] [PATCH 01/14] x86/soft-reset: Drop gfn reference after calling get_gfn_query()

2018-11-21 Thread Andrew Cooper
get_gfn_query() internally takes the p2m lock, and this error path leaves it locked. This wasn't included in XSA-277 because the error path can only be triggered by a carefully timed phymap operation concurrent with the domain being paused and the toolstack issuing DOMCTL_soft_reset. Signed-off-b

[Xen-devel] [PATCH 04/14] x86/p2m: Fix locking in p2m_altp2m_lazy_copy()

2018-11-21 Thread Andrew Cooper
The gfn references need to remain held until after the p2m_set_entry() has completed. This is only a latent bug for now, because there is no per-gfn locking and we recursively hold the main p2m locks. Rearrange the code to have a single exit path, and defer taking the ap2m lock until it is necess

[Xen-devel] [PATCH 02/14] x86/mem-sharing: Don't leave the altp2m lock held when nominating a page

2018-11-21 Thread Andrew Cooper
get_gfn_type_access() internally takes the p2m lock, and nothing ever unlocks it. Switch to using the unlocked accessor instead. This wasn't included in XSA-277 because neither mem-sharing nor altp2m are supported. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Mon

[Xen-devel] [PATCH 05/14] x86/p2m: Don't overwrite p2m_altp2m_lazy_copy()'s callers p2m pointer

2018-11-21 Thread Andrew Cooper
The final parameter to p2m_altp2m_lazy_copy() appears to be unnecessary, and results in very hard-to-follow code. Have the sole caller set its local p2m pointer appropriately, and drop the parameter. With that done, a level of indirection of ap2m can be dropped inside p2m_altp2m_lazy_copy(). Whi

[Xen-devel] [PATCH 06/14] x86/hvm: Make the altp2m locking easier to follow

2018-11-21 Thread Andrew Cooper
Drop the ap2m_active boolean, and consistently use the unlocking form: if ( p2m != hostp2m ) __put_gfn(p2m, gfn); __put_gfn(hostp2m, gfn); which makes it clear that we always unlock the altp2m's gfn if it is in use, and always unlock the hostp2m's gfn. This also drops the ternary expr

[Xen-devel] [PATCH 07/14] x86/p2m: Coding style cleanup

2018-11-21 Thread Andrew Cooper
No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: George Dunlap --- xen/arch/x86/mm/p2m.c | 29 --- xen/include/asm-x86/p2m.h | 91 ++- 2 files changed, 65 insertions(+), 55 d

[Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-21 Thread Andrew Cooper
Most of these issues would be XSAs if these paths were accessible to guests. First, override the {get,put}_gfn() helpers to use gfn_t, which was the original purpose of this patch. guest_iommu_get_table_mfn() has two bugs. First, it gets a ref on one gfn, and puts a ref for a different gfn. Thi

[Xen-devel] [PATCH 09/14] x86/p2m: Switch the two_gfns infrastructure to using gfn_t

2018-11-21 Thread Andrew Cooper
Additionally, drop surrounding trailing whitespace. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: George Dunlap CC: Tamas K Lengyel --- xen/arch/x86/mm/mem_sharing.c | 8 xen/include/asm-x86/p2m.h | 21 ++--- 2 files changed, 14 insertions(+),

[Xen-devel] [PATCH 00/14] XSA-277 followup

2018-11-21 Thread Andrew Cooper
This covers various fixes related to XSA-277 which weren't in security supported areas, and associated cleanup. The biggest issue noticed here is that altp2m's use of hardware #VE support will cause general memory corruption if the guest ever balloons out the VEINFO page. The only safe way I thin

[Xen-devel] [PATCH 08/14] xen/memory: Drop ARM put_gfn() stub

2018-11-21 Thread Andrew Cooper
On x86, get_gfn_*() and put_gfn() are reference counting pairs. All the get_gfn_*() functions are called from within CONFIG_X86 sections, but put_gfn() is stubbed out on ARM. As a result, the common code reads as if ARM is dropping references it never acquired. Put all put_gfn() calls in common

Re: [Xen-devel] [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables

2018-11-21 Thread Jan Beulich
>>> On 21.11.18 at 12:51, wrote: > On Wed, Nov 21, 2018 at 03:58:34AM -0700, Jan Beulich wrote: >> >>> On 21.11.18 at 11:37, wrote: >> > On Wed, Nov 21, 2018 at 02:21:36AM -0700, Jan Beulich wrote: >> >> >>> On 21.11.18 at 00:26, wrote: >> >> > The original commit 0af438757d455f8eb6b5a6ae9a990ae

[Xen-devel] [PATCH 10/14] x86/mm: Switch {get, put}_gfn() infrastructure to using gfn_t

2018-11-21 Thread Andrew Cooper
Seemingly, a majority of users either override the helpers anyway, or have an gfn_t in their hands. Update the API, and adjust all users to match. Doing this highlighted a gaping altp2m security hole in vmx_vcpu_update_vmfunc_ve(), which will need addressing now we can discuss the problem and opt

[Xen-devel] [PATCH 11/14] xen/mm: Switch mfn_to_virt()/virt_to_mfn() to using mfn_t

2018-11-21 Thread Andrew Cooper
Seemingly, a majority of users either override the helpers anyway, or have an mfn_t in their hands. Update the API, and adjust all users to match. In some places, use the unsigned long variant in places where we are interacting with an external struct and there is no chance of them switching to m

[Xen-devel] [PATCH 14/14] xen/gnttab: Minor improvements to arch header files

2018-11-21 Thread Andrew Cooper
* Use XFREE() when appropriate * Drop stale comments and unnecessary brackets * Fold asm constraints No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/include/asm-arm/grant_table.h | 6 ++ xen/include/asm-x86/grant_table.h

[Xen-devel] [PATCH 13/14] xen/gnttab: Simplify gnttab_map_frame()

2018-11-21 Thread Andrew Cooper
* Reflow some lines to remove unnecessary line breaks. * Factor out the gnttab_get_frame_gfn() calculation. Neither x86 nor ARM builds seem to be able to fold the two calls, and the resulting code is far easier to follow. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC:

[Xen-devel] [PATCH 12/14] xen/gnttab: Drop gnttab_create_{shared, status}_page()

2018-11-21 Thread Andrew Cooper
share_xen_page_with_guest() is a common API. Use it directly rather than wrapping it with unnecessary boilerplate. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Stefano Stabellini CC: Julien Grall --- xen/common/grant_table.c | 7 --- xe

Re: [Xen-devel] [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-21 Thread Samuel Ortiz
Hi Michael, On Wed, Nov 21, 2018 at 07:35:47AM -0500, Michael S. Tsirkin wrote: > On Mon, Nov 19, 2018 at 04:31:10PM +0100, Igor Mammedov wrote: > > On Fri, 16 Nov 2018 17:37:54 +0100 > > Paolo Bonzini wrote: > > > > > On 16/11/18 17:29, Igor Mammedov wrote: > > > > General suggestions for this

Re: [Xen-devel] [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-21 Thread Michael S. Tsirkin
On Wed, Nov 21, 2018 at 02:50:30PM +0100, Samuel Ortiz wrote: > Hi Michael, > > On Wed, Nov 21, 2018 at 07:35:47AM -0500, Michael S. Tsirkin wrote: > > On Mon, Nov 19, 2018 at 04:31:10PM +0100, Igor Mammedov wrote: > > > On Fri, 16 Nov 2018 17:37:54 +0100 > > > Paolo Bonzini wrote: > > > > > > >

Re: [Xen-devel] [PATCH v4 10/19] xen: setup hypercall page for PVH

2018-11-21 Thread Juergen Gross
On 20/11/2018 10:27, Juergen Gross wrote: > On 09/11/2018 19:12, Daniel Kiper wrote: >> On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote:>>> + >>> + asm volatile ("wrmsr" : : "c" (msr), "a" (pfn), "d" (0) : "memory"); >>> +} >>> + >>> +int >>> +grub_xen_hypercall (grub_uint32_t callno

Re: [Xen-devel] [PATCH 04/14] x86/p2m: Fix locking in p2m_altp2m_lazy_copy()

2018-11-21 Thread Razvan Cojocaru
On 11/21/18 3:21 PM, Andrew Cooper wrote: > The gfn references need to remain held until after the p2m_set_entry() has > completed. This is only a latent bug for now, because there is no per-gfn > locking and we recursively hold the main p2m locks. > > Rearrange the code to have a single exit pat

Re: [Xen-devel] [PATCH 05/14] x86/p2m: Don't overwrite p2m_altp2m_lazy_copy()'s callers p2m pointer

2018-11-21 Thread Razvan Cojocaru
On 11/21/18 3:21 PM, Andrew Cooper wrote: > The final parameter to p2m_altp2m_lazy_copy() appears to be unnecessary, and > results in very hard-to-follow code. Have the sole caller set its local p2m > pointer appropriately, and drop the parameter. > > With that done, a level of indirection of ap2

Re: [Xen-devel] FOSDEM Devrooms (CfP deadlines for relevant DevRooms from Dec 1-10) and Xen Project Stand

2018-11-21 Thread Lars Kurth
Just a quick reminder that the CfP deadline is coming up Note that FOSDEM has not yet announced the stands Lars From: Lars Kurth Date: Monday, 29 October 2018 at 17:01 To: xen-devel , "mirageos-de...@lists.xenproject.org" , "minios-de...@lists.xenproject.org" , "mirageos-de...@lists.xenproject

[Xen-devel] [PATCH v2] x86/dom0: use MEMF_no_scrub during Dom0 construction

2018-11-21 Thread Sergey Dyasli
Now that idle scrub is the default option, all memory is marked as dirty and alloc_domheap_pages() will do eager scrubbing by default. This can lead to longer Dom0 construction and potentially to a watchdog timeout, especially on older H/W (e.g. Harpertown). Pass MEMF_no_scrub to optimise this pro

Re: [Xen-devel] [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-21 Thread Igor Mammedov
On Wed, 21 Nov 2018 07:35:47 -0500 "Michael S. Tsirkin" wrote: > On Mon, Nov 19, 2018 at 04:31:10PM +0100, Igor Mammedov wrote: > > On Fri, 16 Nov 2018 17:37:54 +0100 > > Paolo Bonzini wrote: > > > > > On 16/11/18 17:29, Igor Mammedov wrote: > > > > General suggestions for this series: > >

[Xen-devel] [PATCH v5 06/20] xen: rearrange xen/init.c to prepare it for Xen PVH mode

2018-11-21 Thread Juergen Gross
Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN as it will not be used when running as PVH. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- grub-core/kern/xen/init.c | 60 +

[Xen-devel] [PATCH v5 07/20] xen: modify grub_xen_ptr2mfn() for xen-pvh

2018-11-21 Thread Juergen Gross
grub_xen_ptr2mfn() returns the machine frame number for a given pointer value. For Xen-PVH guests this is just the PFN. Add the PVH specific variant. Signed-off-by: Juergen Gross --- V5: new patch (Daniel Kiper) --- grub-core/kern/xen/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/

[Xen-devel] [PATCH v5 15/20] xen_pvh: add build runes for grub-core

2018-11-21 Thread Juergen Gross
Add the modifications to the build system needed to build a xen_pvh grub. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: sorted some filenames (Daniel Kiper) V4: add bus/pci.c to xen_pvh --- gentpl.py | 4 ++-- grub-core/Makefile.am | 12 gr

[Xen-devel] [PATCH v5 09/20] xen: add basic hooks for PVH in current code

2018-11-21 Thread Juergen Gross
Add the hooks to current code needed for Xen PVH. They will be filled with code later when the related functionality is being added. loader/i386/linux.c needs to include machine/kernel.h now as it needs to get GRUB_KERNEL_USE_RSDP_ADDR from there. Signed-off-by: Juergen Gross --- V3: xenpvh->xen

[Xen-devel] [PATCH v5 10/20] xen: add PVH boot entry code

2018-11-21 Thread Juergen Gross
Add the code for the Xen PVH mode boot entry. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: clear %fs and %gs, too (Daniel Kiper) use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) V5: reorder clearing segment regs (Daniel Kiper) --- grub-core/kern/i386/x

[Xen-devel] [PATCH v5 20/20] xen_pvh: add support to configure

2018-11-21 Thread Juergen Gross
Support platform i386/xen_pvh in configure. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5e63c4af3..81a19afd5 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,7 @@ case

[Xen-devel] [PATCH v5 04/20] xen: prepare common code for Xen PVH support

2018-11-21 Thread Juergen Gross
Some common code needs to be special cased for Xen PVH mode. This hits mostly Xen PV mode specific areas. Split include/grub/i386/pc/int_types.h off from include/grub/i386/pc/int.h to support including this file later from xen_pvh code without the grub_bios_interrupt definition. Move definition o

[Xen-devel] [PATCH v5 18/20] xen_pvh: support building a standalone image

2018-11-21 Thread Juergen Gross
Support mkimage for xen_pvh. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: some style adjustments (Daniel Kiper) use defines for elf-notes (Daniel Kiper) V5: move elf-note define usage into new patch (Daniel Kiper) I didn't replace the 4096 by a PAGE_SIZE macro as requested

[Xen-devel] [PATCH v5 13/20] xen: setup Xen specific data for PVH

2018-11-21 Thread Juergen Gross
Initialize the needed Xen specific data. This is: - the Xen start of day page containing the console and Xenstore ring page PFN and event channel - the grant table - the shared info page Write back the possibly modified memory map to the hypervisor in case the guest is reading it from there aga

[Xen-devel] [PATCH v5 02/20] loader/linux: support passing rsdp address via boot params

2018-11-21 Thread Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux. Signed-off-by: Juergen Gross --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) V5: move acpi_rsdp_addr to str

[Xen-devel] [PATCH v5 16/20] grub-module-verifier: Ignore all_video for xenpvh

2018-11-21 Thread Juergen Gross
From: Hans van Kranenburg This solves the build failing with "Error: no symbol table and no .moddeps section" Also see: - 6371e9c10433578bb236a8284ddb9ce9e201eb59 - https://savannah.gnu.org/bugs/?49012 Signed-off-by: Hans van Kranenburg Reviewed-by: Daniel Kiper --- V2: new patch Signed-off-b

[Xen-devel] [PATCH v5 01/20] xen: add some xen headers

2018-11-21 Thread Juergen Gross
In order to support grub2 in Xen PVH environment some additional Xen headers are needed as grub2 will be started in PVH mode requiring to use several HVM hypercalls and structures. Add the needed headers from Xen 4.10 being the first Xen version with full (not only experimental) PVH guest support.

[Xen-devel] [PATCH v5 12/20] xen: get memory map from hypervisor for PVH

2018-11-21 Thread Juergen Gross
Retrieve the memory map from the hypervisor and normalize it to contain no overlapping entries and to be sorted by address. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: use grub_e820_mmap_entry instead of own struct (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 94 +++

[Xen-devel] [PATCH v5 00/20] xen: add pvh guest support

2018-11-21 Thread Juergen Gross
This patch series adds support for booting Linux as PVH guest. Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen. For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux

[Xen-devel] [PATCH v5 08/20] xen: add PVH specific defines to offset.h

2018-11-21 Thread Juergen Gross
include/grub/offsets.h needs some defines for Xen PVH mode. Add them. While at it line up the values in the surrounding lines to start at the same column. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: XENPVH->XEN_PVH (Daniel Kiper) --- include/grub/offsets.h | 21 -

[Xen-devel] [PATCH v5 19/20] xen_pvh: support grub-install for xen_pvh

2018-11-21 Thread Juergen Gross
Add xen_pvh support to grub-install. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/include/grub/util/install.h b/include/gru

[Xen-devel] [PATCH v5 03/20] xen: carve out grant tab initialization into dedicated function

2018-11-21 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message (Dan

[Xen-devel] [PATCH v5 14/20] xen: init memory regions for PVH

2018-11-21 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross Reviewed-by: Daniel K

[Xen-devel] [PATCH v5 17/20] xen: use elfnote defines instead of plain numbers

2018-11-21 Thread Juergen Gross
In order to avoid using plain integers for the ELF notes use the available Xen include instead. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- util/grub-mkimagexx.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ut

[Xen-devel] [PATCH v5 11/20] xen: setup hypercall page for PVH

2018-11-21 Thread Juergen Gross
Add the needed code to setup the hypercall page for calling into the Xen hypervisor. Import the XEN_HVM_DEBUGCONS_IOPORT define from Xen unstable into include/xen/arch-x86/xen.h Signed-off-by: Juergen Gross --- V3: grub_xen_early_halt->grub_xen_panic (Roger Pau Monné) issue panic message (Ro

Re: [Xen-devel] [PATCH 1/9] mm: Introduce new vm_insert_range API

2018-11-21 Thread William Kucharski
> On Nov 21, 2018, at 5:35 AM, Matthew Wilcox wrote: > > It's probably better to be more explicit and answer Randy's question: > > * If we fail to insert any page into the vma, the function will return > * immediately leaving any previously-inserted pages present. Callers > * from the mmap ha

  1   2   >