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

2018-11-15 Thread Roger Pau Monné
On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote: > Add the needed code to setup the hypercall page for calling into the > Xen hypervisor. > > Signed-off-by: Juergen Gross Thanks, LGTM, just one suggestion and one question. > --- > V3: grub_xen_early_halt->grub_xen_panic (Roger Pau

[Xen-devel] [PATCH v2] xen/pt: fix some pass-thru devices don't work across reboot

2018-11-15 Thread Chao Gao
I find some pass-thru devices don't work any more across guest reboot. Assigning it to another domain also meets the same issue. And the only way to make it work again is un-binding and binding it to pciback. Someone reported this issue one year ago [1]. If the device's driver doesn't disable MSI-

Re: [Xen-devel] [PATCH RFC 2/6] mm: convert PG_balloon to PG_offline

2018-11-15 Thread David Hildenbrand
On 15.11.18 03:07, Mike Rapoport wrote: > On Wed, Nov 14, 2018 at 11:49:15PM +0100, David Hildenbrand wrote: >> On 14.11.18 23:23, Matthew Wilcox wrote: >>> On Wed, Nov 14, 2018 at 10:17:00PM +0100, David Hildenbrand wrote: Rename PG_balloon to PG_offline. This is an indicator that the page is

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread David Hildenbrand
On 15.11.18 07:19, Dave Young wrote: > Hi David, > > On 11/14/18 at 10:17pm, David Hildenbrand wrote: >> Let's export PG_offline via PAGE_OFFLINE_MAPCOUNT_VALUE, so >> makedumpfile can directly skip pages that are logically offline and the >> content therefore stale. > > It would be good to copy

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

2018-11-15 Thread Roger Pau Monné
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_e820_mmap_entry instead of own struct (Daniel Kiper)

Re: [Xen-devel] [PATCH v4 05/44] x86emul: support basic AVX512 moves

2018-11-15 Thread Jan Beulich
>>> On 14.11.18 at 17:26, wrote: > On 14/11/2018 14:35, Jan Beulich wrote: > On 13.11.18 at 18:12, wrote: >>> On 25/09/2018 14:28, Jan Beulich wrote: @@ -3272,6 +3387,7 @@ x86_emulate( b = ctxt->opcode; d = state.desc; #define state (&state) +elem_bytes

[Xen-devel] [linux-4.4 test] 129898: tolerable FAIL - PUSHED

2018-11-15 Thread osstest service owner
flight 129898 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/129898/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-arndale 16 guest-start/debian.repeat fail in 129761 pass in 129898 test-amd64-amd64-xl-qemut-

[Xen-devel] [ovmf test] 130098: regressions - FAIL

2018-11-15 Thread osstest service owner
flight 130098 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/130098/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 129475 build-amd64-xsm

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

2018-11-15 Thread Roger Pau Monné
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 shared info page > > Write back the possibly modif

Re: [Xen-devel] [PATCH v4 14/19] xen: init memory regions for PVH

2018-11-15 Thread Roger Pau Monné
On Fri, Nov 02, 2018 at 01:37:33PM +0100, Juergen Gross wrote: > 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 a

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Julien Grall
(+ Andre) On 11/15/18 12:47 AM, Andrew Cooper wrote: On 14/11/2018 12:49, Julien Grall wrote: Hi Mirela, On 14/11/2018 12:08, Mirela Simonovic wrote: On 11/13/2018 09:32 AM, Andrew Cooper wrote: On 12/11/2018 19:56, Julien Grall wrote: Hi Andrew, On 11/12/18 4:41 PM, Andrew Cooper wrote:

[Xen-devel] [distros-debian-wheezy test] 75594: all pass

2018-11-15 Thread Platform Team regression test user
flight 75594 distros-debian-wheezy real [real] http://osstest.xensource.com/osstest/logs/75594/ Perfect :-) All tests in this flight passed as required baseline version: flight 75581 jobs: build-amd64 pass build-armhf

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Andrew Cooper
On 15/11/2018 10:13, Julien Grall wrote: > (+ Andre) > > On 11/15/18 12:47 AM, Andrew Cooper wrote: >> On 14/11/2018 12:49, Julien Grall wrote: >>> Hi Mirela, >>> >>> On 14/11/2018 12:08, Mirela Simonovic wrote: On 11/13/2018 09:32 AM, Andrew Cooper wrote: > On 12/11/2018 19:56,

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Mirela Simonovic
On Thu, Nov 15, 2018 at 11:26 AM Andrew Cooper wrote: > > On 15/11/2018 10:13, Julien Grall wrote: > > (+ Andre) > > > > On 11/15/18 12:47 AM, Andrew Cooper wrote: > >> On 14/11/2018 12:49, Julien Grall wrote: > >>> Hi Mirela, > >>> > >>> On 14/11/2018 12:08, Mirela Simonovic wrote: > >

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Julien Grall
Hi Andrew, On 11/15/18 10:26 AM, Andrew Cooper wrote: On 15/11/2018 10:13, Julien Grall wrote: (+ Andre) On 11/15/18 12:47 AM, Andrew Cooper wrote: On 14/11/2018 12:49, Julien Grall wrote: Hi Mirela, On 14/11/2018 12:08, Mirela Simonovic wrote: On 11/13/2018 09:32 AM, Andrew Cooper wrote

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Julien Grall
Hi Andrew, On 11/15/18 10:26 AM, Andrew Cooper wrote: On 15/11/2018 10:13, Julien Grall wrote: (+ Andre) On 11/15/18 12:47 AM, Andrew Cooper wrote: On 14/11/2018 12:49, Julien Grall wrote: Hi Mirela, On 14/11/2018 12:08, Mirela Simonovic wrote: On 11/13/2018 09:32 AM, Andrew Cooper wrote

Re: [Xen-devel] [PATCH v2] xen/pt: fix some pass-thru devices don't work across reboot

2018-11-15 Thread Roger Pau Monné
On Thu, Nov 15, 2018 at 09:10:26AM +0800, Chao Gao wrote: > I find some pass-thru devices don't work any more across guest > reboot. Assigning it to another domain also meets the same issue. And > the only way to make it work again is un-binding and binding it to > pciback. Someone reported this is

[Xen-devel] [ovmf test] 130103: regressions - FAIL

2018-11-15 Thread osstest service owner
flight 130103 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/130103/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 129475 build-amd64-xsm

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Andrew Cooper
On 15/11/2018 10:36, Julien Grall wrote: > Hi Andrew, > > On 11/15/18 10:26 AM, Andrew Cooper wrote: >> On 15/11/2018 10:13, Julien Grall wrote: >>> (+ Andre) >>> >>> On 11/15/18 12:47 AM, Andrew Cooper wrote: On 14/11/2018 12:49, Julien Grall wrote: > Hi Mirela, > > On 14/11/2018

Re: [Xen-devel] [PATCH v3 3/5] xen/domain: Move guest type checks into the arch_sanitise_domain_config() path

2018-11-15 Thread Jan Beulich
>>> On 14.11.18 at 18:44, wrote: > This is a more appropriate location for the checks to happen, and cleans up > the common code substantially. > > Take the opportunity to make ARM strictly require HVM|HAP for guests, which is > how the toolstack behaves, and leave a dprintk() behind for auditing

Re: [Xen-devel] [PATCH V6 3/4] x86/mm: allocate logdirty_ranges for altp2ms

2018-11-15 Thread Jan Beulich
>>> On 14.11.18 at 21:40, wrote: > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -2282,6 +2282,34 @@ bool_t p2m_altp2m_lazy_copy(struct vcpu *v, paddr_t > gpa, > return 1; > } > > +static void p2m_reset_altp2m(struct domain *d, unsigned int idx, > +

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Julien Grall
Hi Mirela, On 11/15/18 10:33 AM, Mirela Simonovic wrote: On Thu, Nov 15, 2018 at 11:26 AM Andrew Cooper wrote: On 15/11/2018 10:13, Julien Grall wrote: (+ Andre) On 11/15/18 12:47 AM, Andrew Cooper wrote: On 14/11/2018 12:49, Julien Grall wrote: Hi Mirela, On 14/11/2018 12:08, Mirela Sim

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Thu, Nov 15, 2018 at 11:59 AM Julien Grall wrote: > > Hi Mirela, > > On 11/15/18 10:33 AM, Mirela Simonovic wrote: > > On Thu, Nov 15, 2018 at 11:26 AM Andrew Cooper > > wrote: > >> > >> On 15/11/2018 10:13, Julien Grall wrote: > >>> (+ Andre) > >>> > >>> On 11/15/18 12:47 AM, Andr

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread Borislav Petkov
On Thu, Nov 15, 2018 at 02:19:23PM +0800, Dave Young wrote: > It would be good to copy some background info from cover letter to the > patch description so that we can get better understanding why this is > needed now. > > BTW, Lianbo is working on a documentation of the vmcoreinfo exported > fiel

[Xen-devel] [PATCH v6.2 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-15 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- v6.2: Add definition of the internal broken state updated comments about states --- tools/libxl/libxl_internal.h | 35 ++ tools/libxl/libxl_qmp.c | 708 +++ tools/libxl/libxl_types.idl | 6 + 3 files changed, 749

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread David Hildenbrand
On 15.11.18 12:10, Borislav Petkov wrote: > On Thu, Nov 15, 2018 at 02:19:23PM +0800, Dave Young wrote: >> It would be good to copy some background info from cover letter to the >> patch description so that we can get better understanding why this is >> needed now. >> >> BTW, Lianbo is working on a

Re: [Xen-devel] [PATCH 3/3] xen-init-dom0: set Dom0 UUID if requested

2018-11-15 Thread Wei Liu
On Thu, Nov 15, 2018 at 10:45:52AM +, Edwin Török wrote: > On 14/11/2018 18:17, Wei Liu wrote: > > Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set > > it for Dom0. > > > > Signed-off-by: Wei Liu > > [snip] > In general this looks good, however I am not familiar with libx

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

2018-11-15 Thread Andrii Anisov
Hello Julien, вт, 6 лист. 2018 о 21:16 Julien Grall пише: > @@ -275,7 +280,38 @@ struct page_info *p2m_get_page_from_gfn(struct domain > *d, gfn_t gfn, > static inline struct page_info *get_page_from_gfn( > struct domain *d, unsigned long gfn, p2m_type_t *t, p2m_query_t q) > { > -retu

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Julien Grall
Hi, On 11/15/18 11:10 AM, Mirela Simonovic wrote: Hi Julien, On Thu, Nov 15, 2018 at 11:59 AM Julien Grall wrote: Hi Mirela, On 11/15/18 10:33 AM, Mirela Simonovic wrote: On Thu, Nov 15, 2018 at 11:26 AM Andrew Cooper wrote: On 15/11/2018 10:13, Julien Grall wrote: (+ Andre) On 11/15/

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

2018-11-15 Thread Julien Grall
On 11/15/18 11:33 AM, Andrii Anisov wrote: Hello Julien, Hi, вт, 6 лист. 2018 о 21:16 Julien Grall пише: @@ -275,7 +280,38 @@ struct page_info *p2m_get_page_from_gfn(struct domain *d, gfn_t gfn, static inline struct page_info *get_page_from_gfn( struct domain *d, unsigned long g

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Thu, Nov 15, 2018 at 12:38 PM Julien Grall wrote: > > Hi, > > On 11/15/18 11:10 AM, Mirela Simonovic wrote: > > Hi Julien, > > > > On Thu, Nov 15, 2018 at 11:59 AM Julien Grall wrote: > >> > >> Hi Mirela, > >> > >> On 11/15/18 10:33 AM, Mirela Simonovic wrote: > >>> On Thu, Nov 15,

Re: [Xen-devel] [PATCH 3/8] xen/arm: Rename p2m_map_foreign to p2m_map_foreign_rw

2018-11-15 Thread Andrii Anisov
Hello Julien, I'm not sure why do you need this patch to be separated from "[PATCH 4/8] xen/arm: Add support for read-only foreign mappings". But I would not argue for that. Reviewed-by: Andrii Anisov Sincerely, Andrii Anisov. ___ Xen-devel mailin

[Xen-devel] [ovmf test] 130106: regressions - FAIL

2018-11-15 Thread osstest service owner
flight 130106 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/130106/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 129475 build-amd64-xsm

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread Borislav Petkov
On Thu, Nov 15, 2018 at 12:20:40PM +0100, David Hildenbrand wrote: > Sorry to say, but that is the current practice without which > makedumpfile would not be able to work at all. (exclude user pages, > exclude page cache, exclude buddy pages). Let's not reinvent the wheel > here. This is how dumpin

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread David Hildenbrand
On 15.11.18 12:52, Borislav Petkov wrote: > On Thu, Nov 15, 2018 at 12:20:40PM +0100, David Hildenbrand wrote: >> Sorry to say, but that is the current practice without which >> makedumpfile would not be able to work at all. (exclude user pages, >> exclude page cache, exclude buddy pages). Let's no

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

2018-11-15 Thread Andrii Anisov
чт, 15 лист. 2018 о 13:40 Julien Grall пише: > If I drop _t then I need to add if ( *t ) in 3 places in that code. So I > don't think the approach is any better. Ouch, I kept in my mind two places. Something like: if ( t ) *t = p2m_invalid; if ( t ) *t = ( page->u.inuse.type_info &

Re: [Xen-devel] [PATCH 3/8] xen/arm: Rename p2m_map_foreign to p2m_map_foreign_rw

2018-11-15 Thread Julien Grall
On 11/15/18 11:42 AM, Andrii Anisov wrote: Hello Julien, Hi Andrii, I'm not sure why do you need this patch to be separated from "[PATCH 4/8] xen/arm: Add support for read-only foreign mappings". But I would not argue for that. Reviewed-by: Andrii Anisov We tend to separate renamin

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

2018-11-15 Thread Julien Grall
On 11/15/18 12:02 PM, Andrii Anisov wrote: чт, 15 лист. 2018 о 13:40 Julien Grall пише: If I drop _t then I need to add if ( *t ) in 3 places in that code. So I don't think the approach is any better. Ouch, I kept in my mind two places. Something like: if ( t ) *t = p2m_invalid;

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread Michal Hocko
On Thu 15-11-18 12:52:13, Borislav Petkov wrote: > On Thu, Nov 15, 2018 at 12:20:40PM +0100, David Hildenbrand wrote: > > Sorry to say, but that is the current practice without which > > makedumpfile would not be able to work at all. (exclude user pages, > > exclude page cache, exclude buddy pages)

Re: [Xen-devel] [PATCH V6 3/4] x86/mm: allocate logdirty_ranges for altp2ms

2018-11-15 Thread Razvan Cojocaru
On 11/15/18 12:56 PM, Jan Beulich wrote: On 14.11.18 at 21:40, wrote: >> --- a/xen/arch/x86/mm/p2m.c >> +++ b/xen/arch/x86/mm/p2m.c >> @@ -2282,6 +2282,34 @@ bool_t p2m_altp2m_lazy_copy(struct vcpu *v, paddr_t >> gpa, >> return 1; >> } >> >> +static void p2m_reset_altp2m(struct domai

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

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

Re: [Xen-devel] [PATCH RFC 2/6] mm: convert PG_balloon to PG_offline

2018-11-15 Thread Michal Hocko
[Cc Konstantin - the patch is http://lkml.kernel.org/r/20181114211704.6381-3-da...@redhat.com] On Thu 15-11-18 10:21:13, David Hildenbrand wrote: > On 15.11.18 03:07, Mike Rapoport wrote: > > On Wed, Nov 14, 2018 at 11:49:15PM +0100, David Hildenbrand wrote: > >> On 14.11.18 23:23, Matthew Wilcox

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

2018-11-15 Thread Michal Hocko
On Wed 14-11-18 22:17:04, David Hildenbrand wrote: [...] > diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c > index b0308a2c6000..01db1d13481a 100644 > --- a/kernel/power/snapshot.c > +++ b/kernel/power/snapshot.c > @@ -1222,7 +1222,7 @@ static struct page *saveable_highmem_page(struc

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

2018-11-15 Thread David Hildenbrand
On 15.11.18 13:23, Michal Hocko wrote: > On Wed 14-11-18 22:17:04, David Hildenbrand wrote: > [...] >> diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c >> index b0308a2c6000..01db1d13481a 100644 >> --- a/kernel/power/snapshot.c >> +++ b/kernel/power/snapshot.c >> @@ -1222,7 +1222,7 @@

[Xen-devel] A virtualisation tool

2018-11-15 Thread Okash Khawaja
Hi, I'm working on a tool to observe Intel's virtualisation state. You can read about it here [1] and view the source code so far here [2]. I started this for my own learning but now I'm wondering if this could be extended so that it has real use. If you have any ideas, let me know and I will be

Re: [Xen-devel] [PATCH 3/3] xen-init-dom0: set Dom0 UUID if requested

2018-11-15 Thread Edwin Török
On 14/11/2018 18:17, Wei Liu wrote: > Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set > it for Dom0. > > Signed-off-by: Wei Liu [snip] In general this looks good, however I am not familiar with libxl conventions, so just some generic comments below. > +static void get_dom0_

Re: [Xen-devel] [PATCH v5 12/24] hw: acpi: Export the MCFG getter

2018-11-15 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:35 +0100 Samuel Ortiz wrote: > From: Yang Zhong > > The ACPI MCFG getter is not x86 specific and could be called from > anywhere within generic ACPI API, so let's export it. So far it's x86 or more exactly q35 specific thing, for example it won't work with arm/virt wit

Re: [Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Wed, Nov 14, 2018 at 7:48 PM Julien Grall wrote: > > Hi, > > On 14/11/2018 17:35, Mirela Simonovic wrote: > > On Wed, Nov 14, 2018 at 6:10 PM Julien Grall wrote: > >> On 14/11/2018 15:40, Mirela Simonovic wrote: > >>> On Wed, Nov 14, 2018 at 4:07 PM Julien Grall wrote: > On 1

[Xen-devel] [PATCH v2 3/3] x86/HVM: honor p2m_ioreq_server type

2018-11-15 Thread Jan Beulich
1: __hvm_copy() should not write to p2m_ioreq_server pages 2: hvm_map_guest_frame_rw() should respect p2m_ioreq_server 3: emulate_gva_to_mfn() should respect p2m_ioreq_server Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.

[Xen-devel] [PATCH v2 0/3] x86/HVM: honor p2m_ioreq_server type

2018-11-15 Thread Jan Beulich
1: __hvm_copy() should not write to p2m_ioreq_server pages 2: hvm_map_guest_frame_rw() should respect p2m_ioreq_server 3: emulate_gva_to_mfn() should respect p2m_ioreq_server Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.

Re: [Xen-devel] [PATCH v5 14/24] hw: i386: Make the hotpluggable memory size property more generic

2018-11-15 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:37 +0100 Samuel Ortiz wrote: > This property is currently defined under i386/pc while it only describes > a region size that's eventually fetched from the AML ACPI code. > > We can make it more generic and shareable across machine types by moving > it to memory-device.h

[Xen-devel] [PATCH v2 1/3] x86/HVM: __hvm_copy() should not write to p2m_ioreq_server pages

2018-11-15 Thread Jan Beulich
Commit 3bdec530a5 ("x86/HVM: split page straddling emulated accesses in more cases") introduced a hvm_copy_to_guest_linear() attempt before falling back to hvmemul_linear_mmio_write(). This is wrong for the p2m_ioreq_server special case. That change widened a pre-existing issue though: Other writes

[Xen-devel] [PATCH v2 2/3] x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server

2018-11-15 Thread Jan Beulich
Writes to such pages would need to be handed to the emulator, which we're not prepared to do at this point. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2558,7 +2558,8 @@ static void *_hvm_map_guest_frame(unsign if ( w

[Xen-devel] [PATCH v2 3/3] x86/shadow: emulate_gva_to_mfn() should respect p2m_ioreq_server

2018-11-15 Thread Jan Beulich
Writes to such pages need to be handed to the emulator. Signed-off-by: Jan Beulich --- v2: Return BAD_GFN_TO_MFN instead. --- a/xen/arch/x86/mm/shadow/hvm.c +++ b/xen/arch/x86/mm/shadow/hvm.c @@ -338,6 +338,11 @@ static mfn_t emulate_gva_to_mfn(struct v { return _mfn(BAD_GFN_TO_MFN

Re: [Xen-devel] [PATCH v2 3/3] x86/shadow: emulate_gva_to_mfn() should respect p2m_ioreq_server

2018-11-15 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 15 November 2018 12:52 > To: xen-devel > Cc: Andrew Cooper ; Paul Durrant > ; Roger Pau Monne ; Wei Liu > ; Tim (Xen.org) > Subject: [PATCH v2 3/3] x86/shadow: emulate_gva_to_mfn() should respect > p2m_ioreq_serve

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

2018-11-15 Thread Andrii Anisov
> So I would prefer to stick with _t which is quite common within the p2m > code base so far. I've found a similar code only in one place - p2m_get_entry() function. And it is, at least, somehow commented there: ... /* Allow t to be NULL */ t = t ?: &_t; *t = p2m_invalid; ... But IMO

Re: [Xen-devel] [Qemu-devel] [PATCH v5 15/24] hw: i386: Export the i386 ACPI SRAT build method

2018-11-15 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:38 +0100 Samuel Ortiz wrote: > This is the standard way of building SRAT on x86 platfoms. But future > machine types could decide to define their own custom SRAT build method > through the ACPI builder methods. > Moreover, we will also need to reach build_srat() from out

Re: [Xen-devel] [PATCH 2/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn

2018-11-15 Thread Andrii Anisov
Hello Julien, вт, 6 лист. 2018 о 21:16 Julien Grall пише: > > In a follow-up patches, we will need to handle get_page_from_gfn > differently for DOMID_XEN. To keep the code simple move the current > content in a new separate helper p2m_get_page_from_gfn. > > Note the new helper is a not anymore a

Re: [Xen-devel] [PATCH 2/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn

2018-11-15 Thread Andrii Anisov
Sorry, Not "comparingly complex", but "equally complex". ;) Sincerely, Andrii Anisov. чт, 15 лист. 2018 о 15:31 Andrii Anisov пише: > > Hello Julien, > > вт, 6 лист. 2018 о 21:16 Julien Grall пише: > > > > In a follow-up patches, we will need to handle get_page_from_gfn > > differently for DOMI

Re: [Xen-devel] [PATCH 3/3] xen-init-dom0: set Dom0 UUID if requested

2018-11-15 Thread Wei Liu
On Thu, Nov 15, 2018 at 11:20:37AM +, Wei Liu wrote: > On Thu, Nov 15, 2018 at 10:45:52AM +, Edwin Török wrote: > > On 14/11/2018 18:17, Wei Liu wrote: > > > Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set > > > it for Dom0. > > > > > > Signed-off-by: Wei Liu > > > >

Re: [Xen-devel] [PATCH 3/3] xen-init-dom0: set Dom0 UUID if requested

2018-11-15 Thread Andrew Cooper
On 15/11/2018 13:35, Wei Liu wrote: > On Thu, Nov 15, 2018 at 11:20:37AM +, Wei Liu wrote: >> On Thu, Nov 15, 2018 at 10:45:52AM +, Edwin Török wrote: >>> On 14/11/2018 18:17, Wei Liu wrote: Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set it for Dom0. >>>

Re: [Xen-devel] [PATCH 5/8] xen/arm: Allow a privileged domain to map foreign page from DOMID_XEN

2018-11-15 Thread Andrii Anisov
Reviewed-by: Andrii Anisov Sincerely, Andrii Anisov. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 6/8] xen/arm: Initialize trace buffer

2018-11-15 Thread Andrii Anisov
Reviewed-by: Andrii Anisov Sincerely, Andrii Anisov. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 2/4] x86/vvmx: Correct the INVALID_PADDR checks for VMPTRLD/VMCLEAR

2018-11-15 Thread Andrew Cooper
The referenced addresses also need checking against MAXPHYSADDR. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Sergey Dyasli CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx/vvmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[Xen-devel] [PATCH 1/4] x86/vvmx: Drop unused CASE_{GET, SET}_REG() macros

2018-11-15 Thread Andrew Cooper
These have been obsolete since c/s 053ae230 "x86/vvmx: Remove enum vmx_regs_enc". Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Sergey Dyasli CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx/vvmx.c | 5 - 1 file changed, 5 deletions(-) di

[Xen-devel] [PATCH 4/4] x86/vvmx: Don't call vmsucceed() at the end of virtual_vmexit()

2018-11-15 Thread Andrew Cooper
This ends up corrupting L1's view of RFLAGS by setting ZF. The correct value is established earlier in the function. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Sergey Dyasli CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx/vvmx.c | 1 - 1

[Xen-devel] [PATCH 0/4] x86/vvmx: Misc fixes

2018-11-15 Thread Andrew Cooper
All from code inspection Andrew Cooper (4): x86/vvmx: Drop unused CASE_{GET,SET}_REG() macros x86/vvmx: Correct the INVALID_PADDR checks for VMPTRLD/VMCLEAR x86/vvmx: Fixes to VMWRITE emulation x86/vvmx: Don't call vmsucceed() at the end of virtual_vmexit() xen/arch/x86/hvm/vmx/vvmx.c |

[Xen-devel] [PATCH 3/4] x86/vvmx: Fixes to VMWRITE emulation

2018-11-15 Thread Andrew Cooper
* Don't assume that decode_vmx_inst() always returns X86EMUL_EXCEPTION. * The okay boolean is never written, making the else case dead. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Sergey Dyasli CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/

Re: [Xen-devel] [PATCH v2 0/3] x86/HVM: honor p2m_ioreq_server type

2018-11-15 Thread Andrew Cooper
On 15/11/2018 12:45, Jan Beulich wrote: > 1: __hvm_copy() should not write to p2m_ioreq_server pages > 2: hvm_map_guest_frame_rw() should respect p2m_ioreq_server > 3: emulate_gva_to_mfn() should respect p2m_ioreq_server Acked-by: Andrew Cooper ___ Xen

Re: [Xen-devel] [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-15 Thread Borislav Petkov
On Thu, Nov 15, 2018 at 01:11:02PM +0100, Michal Hocko wrote: > I am not familiar with kexec to judge this particular patch but we > cannot simply define any range for these pages (same as for hwpoison > ones) because they can be almost anywhere in the available memory range. > Then there can be co

Re: [Xen-devel] [PATCH 6/6] x86/emul: dedup hvmemul_cpuid() and pv_emul_cpuid()

2018-11-15 Thread Andrew Cooper
On 09/11/2018 17:16, Andrew Cooper wrote: > >> However, one >> issue already might be that in order for bits in a (sub)leaf above >> (guest) limits to come out all clear, it is guest_cpuid() which cuts >> things off. Neither cpuid_featureset_to_policy() nor its inverse >> nor sanitise_featureset()

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

2018-11-15 Thread osstest service owner
flight 130110 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/130110/ 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

Re: [Xen-devel] [PATCH 1/3] tools: update examples/README

2018-11-15 Thread Andrew Cooper
On 14/11/2018 18:17, Wei Liu wrote: > This file gets installed to the host system. > > This patch cleans it up: 1. remove things that don't exist anymore; 2. > change xm to xl; 3. fix xen-devel list address; 4. add things that are > missing. > > Signed-off-by: Wei Liu Is this file actually worth

[Xen-devel] [ovmf test] 130112: regressions - FAIL

2018-11-15 Thread osstest service owner
flight 130112 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/130112/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 129475 build-amd64-xsm

[Xen-devel] [PATCH v2 3/3] xen-init-dom0: set Dom0 UUID if requested

2018-11-15 Thread Wei Liu
Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set it for Dom0. Signed-off-by: Wei Liu --- v2: 1. add missing "goto out" 2. print file names more 3. also print errno in xc_interface_open error message 4. take care of short-read --- tools/examples/Makefile | 1 + tools/ex

Re: [Xen-devel] [PATCH 1/3] tools: update examples/README

2018-11-15 Thread Wei Liu
On Thu, Nov 15, 2018 at 02:28:15PM +, Andrew Cooper wrote: > On 14/11/2018 18:17, Wei Liu wrote: > > This file gets installed to the host system. > > > > This patch cleans it up: 1. remove things that don't exist anymore; 2. > > change xm to xl; 3. fix xen-devel list address; 4. add things that

Re: [Xen-devel] [PATCH 2/3] tools/helpers: make gen_stub_json_config accept an UUID argument

2018-11-15 Thread Andrew Cooper
On 14/11/2018 18:17, Wei Liu wrote: > If that's set, the stub is going to contain that UUID. > > No functional change. > > Signed-off-by: Wei Liu > --- > tools/helpers/init-dom-json.c| 5 - > tools/helpers/init-dom-json.h| 3 ++- > tools/helpers/init-xenstore-domain.c | 2 +- >

Re: [Xen-devel] [PATCH v2 02/11] tools/libs/toollog: Use the default logger

2018-11-15 Thread Wei Liu
On Thu, Nov 08, 2018 at 05:07:56PM +, Ian Jackson wrote: > Previously xtl_log, xtl_logv and xtl_progress would all crash if > passed logger=NULL. Have the use the default logger instead. > This is more convenient. > > Signed-off-by: Ian Jackson Acked-by: Wei Liu __

Re: [Xen-devel] [PATCH v2 03/11] tools/libs/*: Rely on the default logger

2018-11-15 Thread Wei Liu
On Thu, Nov 08, 2018 at 05:07:57PM +, Ian Jackson wrote: > Delete 11 entirely formulaic conditional calls to > xtl_createlogger_stdiostream(stderr, XTL_PROGRESS, 0); > and associated logger_tofree variables, error handling, etc. > > No overall functional change, although some memory allocati

Re: [Xen-devel] [PATCH v2 11/11] tools/libvchan: libxenvchan_client_init: use ENOENT for no server

2018-11-15 Thread Wei Liu
On Thu, Nov 08, 2018 at 05:08:05PM +, Ian Jackson wrote: > * Promise that we will set errno to ENOENT if the server is not > yet set up. > * Arrange that all ENOENT returns other than from the read of ring-ref > are turned into EIO, logging when we do so. > > Signed-off-by: Ian Jackson A

Re: [Xen-devel] [PATCH 1/4] x86/vvmx: Drop unused CASE_{GET, SET}_REG() macros

2018-11-15 Thread Roger Pau Monné
On Thu, Nov 15, 2018 at 01:52:47PM +, Andrew Cooper wrote: > These have been obsolete since c/s 053ae230 "x86/vvmx: Remove enum > vmx_regs_enc". > > Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné ___ Xen-devel mailing list Xen-devel@li

Re: [Xen-devel] [PATCH 2/4] x86/vvmx: Correct the INVALID_PADDR checks for VMPTRLD/VMCLEAR

2018-11-15 Thread Roger Pau Monné
On Thu, Nov 15, 2018 at 01:52:48PM +, Andrew Cooper wrote: > The referenced addresses also need checking against MAXPHYSADDR. > > Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné > --- > CC: Jan Beulich > CC: Wei Liu > CC: Roger Pau Monné > CC: Sergey Dyasli > CC: Jun Nakajima

Re: [Xen-devel] [PATCH 3/4] x86/vvmx: Fixes to VMWRITE emulation

2018-11-15 Thread Roger Pau Monné
On Thu, Nov 15, 2018 at 01:52:49PM +, Andrew Cooper wrote: > * Don't assume that decode_vmx_inst() always returns X86EMUL_EXCEPTION. > * The okay boolean is never written, making the else case dead. > > Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné ___

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

2018-11-15 Thread Julien Grall
Hi, On 11/15/18 1:19 PM, Andrii Anisov wrote: So I would prefer to stick with _t which is quite common within the p2m code base so far. I've found a similar code only in one place - p2m_get_entry() function. And it is, at least, somehow commented there: ... /* Allow t to be NULL */ t

Re: [Xen-devel] [PATCH 6/6] x86/emul: dedup hvmemul_cpuid() and pv_emul_cpuid()

2018-11-15 Thread Jan Beulich
>>> On 15.11.18 at 15:23, wrote: > On 09/11/2018 17:16, Andrew Cooper wrote: >> >>> However, one >>> issue already might be that in order for bits in a (sub)leaf above >>> (guest) limits to come out all clear, it is guest_cpuid() which cuts >>> things off. Neither cpuid_featureset_to_policy() nor

Re: [Xen-devel] [PATCH v2] xen: report PV capability in sysctl and use it in toolstack

2018-11-15 Thread Ian Jackson
Wei Liu writes ("[PATCH v2] xen: report PV capability in sysctl and use it in toolstack"): > 0e2c886ef ("xen: decouple HVM and IOMMU capabilities") provided a > truth table for what `xl info` would report. In order to make the > table work xen will need to report its PV capability. Acked-by: Ian

Re: [Xen-devel] [PATCH v2 3/3] xen-init-dom0: set Dom0 UUID if requested

2018-11-15 Thread Edwin Török
On 15/11/2018 14:30, Wei Liu wrote: > Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set > it for Dom0. > > Signed-off-by: Wei Liu > --- > v2: > 1. add missing "goto out" > 2. print file names more > 3. also print errno in xc_interface_open error message > 4. take care of short-

Re: [Xen-devel] [PATCH 4/4] x86/vvmx: Don't call vmsucceed() at the end of virtual_vmexit()

2018-11-15 Thread Roger Pau Monné
On Thu, Nov 15, 2018 at 01:52:50PM +, Andrew Cooper wrote: > This ends up corrupting L1's view of RFLAGS by setting ZF. The correct value > is established earlier in the function. > > Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné ___

Re: [Xen-devel] [PATCH 2/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn

2018-11-15 Thread Julien Grall
On 11/15/18 1:31 PM, Andrii Anisov wrote: Hello Julien, Hi, вт, 6 лист. 2018 о 21:16 Julien Grall пише: In a follow-up patches, we will need to handle get_page_from_gfn differently for DOMID_XEN. To keep the code simple move the current content in a new separate helper p2m_get_page_from

Re: [Xen-devel] [PATCH v2 3/3] x86/shadow: emulate_gva_to_mfn() should respect p2m_ioreq_server

2018-11-15 Thread Tim Deegan
At 05:51 -0700 on 15 Nov (1542261108), Jan Beulich wrote: > Writes to such pages need to be handed to the emulator. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject

Re: [Xen-devel] [PATCH 4/4] x86/vvmx: Don't call vmsucceed() at the end of virtual_vmexit()

2018-11-15 Thread Sergey Dyasli
On 15/11/2018 13:52, Andrew Cooper wrote: > This ends up corrupting L1's view of RFLAGS by setting ZF. The correct value > is established earlier in the function. vmsucceed() doesn't set any flags, only clears some. And in this function it's just redundant. ZF is set by VMfailValid. So I think th

Re: [Xen-devel] [PATCH 4/4] x86/vvmx: Don't call vmsucceed() at the end of virtual_vmexit()

2018-11-15 Thread Andrew Cooper
On 15/11/2018 15:28, Sergey Dyasli wrote: > On 15/11/2018 13:52, Andrew Cooper wrote: >> This ends up corrupting L1's view of RFLAGS by setting ZF. The correct value >> is established earlier in the function. > vmsucceed() doesn't set any flags, only clears some. And in this function it's > just r

Re: [Xen-devel] [PATCH v4 4/5] amd/iommu: assign iommu devices to Xen

2018-11-15 Thread Jan Beulich
>>> On 14.11.18 at 12:57, wrote: > --- a/xen/drivers/passthrough/amd/iommu_init.c > +++ b/xen/drivers/passthrough/amd/iommu_init.c > @@ -993,6 +993,16 @@ static void * __init allocate_ppr_log(struct amd_iommu > *iommu) > > static int __init amd_iommu_init_one(struct amd_iommu *iommu) > { > +

[Xen-devel] [PATCH 0/9] Use vm_insert_range

2018-11-15 Thread Souptick Joarder
Previouly drivers have their own way of mapping range of kernel pages/memory into user vma and this was done by invoking vm_insert_page() within a loop. As this pattern is common across different drivers, it can be generalized by creating a new function and use it across the drivers. vm_insert_ra

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

2018-11-15 Thread Jan Beulich
>>> On 14.11.18 at 12:57, wrote: > Bridges are not behind an IOMMU, and are already special cased and > silently skipped in amd_iommu_add_device. Apply the same special > casing when updating page tables. But bridges also don't issue I/O on their own if I'm not mistaken. So what I'm missing here

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

2018-11-15 Thread Souptick Joarder
Previouly drivers have their own way of mapping range of kernel pages/memory into user vma and this was done by invoking vm_insert_page() within a loop. As this pattern is common across different drivers, it can be generalized by creating a new function and use it across the drivers. vm_insert_ra

Re: [Xen-devel] [PATCH 0/4] x86/vvmx: Misc fixes

2018-11-15 Thread Sergey Dyasli
On 15/11/2018 13:52, Andrew Cooper wrote: > All from code inspection > > Andrew Cooper (4): > x86/vvmx: Drop unused CASE_{GET,SET}_REG() macros > x86/vvmx: Correct the INVALID_PADDR checks for VMPTRLD/VMCLEAR > x86/vvmx: Fixes to VMWRITE emulation > x86/vvmx: Don't call vmsucceed() at the

[Xen-devel] [PATCH 5/9] drm/xen/xen_drm_front_gem.c: Convert to use vm_insert_range

2018-11-15 Thread Souptick Joarder
Convert to use vm_insert_range() to map range of kernel memory to user vma. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- drivers/gpu/drm/xen/xen_drm_front_gem.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/xen/xen_d

[Xen-devel] [PATCH 9/9] xen/privcmd-buf.c: Convert to use vm_insert_range

2018-11-15 Thread Souptick Joarder
Convert to use vm_insert_range() to map range of kernel memory to user vma. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- drivers/xen/privcmd-buf.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c

[Xen-devel] [PATCH 8/9] xen/gntdev.c: Convert to use vm_insert_range

2018-11-15 Thread Souptick Joarder
Convert to use vm_insert_range() to map range of kernel memory to user vma. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- drivers/xen/gntdev.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index b0b0

  1   2   >