Re: [Xen-devel] [PATCH RESEND v2 0/2] drm/xen-front: Add support for Xen PV display frontend

2018-03-19 Thread Oleksandr Andrushchenko
On 03/20/2018 01:23 AM, Boris Ostrovsky wrote: On 03/13/2018 12:21 PM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Hello! Resending with all the patches squashed on Daniel's request. Which of the two series are we supposed to review? The 8-patch one or this? (I hope it's the

Re: [Xen-devel] [PATCH] x86/xen: Delay get_cpu_cap until stack canary is established

2018-03-19 Thread Juergen Gross
On 19/03/18 23:22, Boris Ostrovsky wrote: > On 03/19/2018 12:58 PM, Jason Andryuk wrote: >> Commit 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") introduced a >> call to get_cpu_cap, which is fstack-protected. This is works on x86-64 > > s/This is works/This works/ > > Reviewed-by: Boris Os

Re: [Xen-devel] broken build: 448c03b3cbe14873ee637755a29ea26ee7ca9ef9

2018-03-19 Thread Juergen Gross
On 19/03/18 20:04, Doug Goldstein wrote: > commit 448c03b3cbe14873ee637755a29ea26ee7ca9ef9 > Author: Juergen Gross > Date: Mon Feb 26 09:46:12 2018 +0100 > > This commit breaks the build of qemu-xen-traditional for: > > Ubuntu 14.04: https://gitlab.com/cardoe/xen/-/jobs/58266170 > Ubuntu 16.04

Re: [Xen-devel] X86 Community Call: Wed March 14, 15:00 - 16:00 UTC - Minutes

2018-03-19 Thread Tian, Kevin
> From: Lars Kurth > Sent: Thursday, March 15, 2018 2:07 AM > > > ## [PATCH RFC 00/10] x86 passthrough code cleanup > > ## Sent in for meeting agenda by Wei > > https://lists.xenproject.org/archives/html/xen-devel/2018- > 02/msg01939.html > Wei wanted to get the maintainers opinions on what is

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

2018-03-19 Thread osstest service owner
flight 120921 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/120921/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 120863 test-armhf-armhf-libvirt 14 saveresto

[Xen-devel] [rumprun test] 120932: regressions - FAIL

2018-03-19 Thread osstest service owner
flight 120932 rumprun real [real] http://logs.test-lab.xenproject.org/osstest/logs/120932/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-rumprun 6 rumprun-buildfail REGR. vs. 106754 build-i386-rumprun

Re: [Xen-devel] [PATCH 20/20] xen/domain: Allocate d->vcpu[] in arch_domain_create()

2018-03-19 Thread Julien Grall
(+ Andre) On 03/19/2018 07:13 PM, Andrew Cooper wrote: On the ARM side, audit config->max_vcpus after the vgic has been initialised, at which point we have a real upper bound to test against. This allows for the removal of the vgic_max_vcpus() juggling to cope with the call from evtchn_init() b

Re: [Xen-devel] [PATCH 18/20] xen/dom0: Arrange for dom0_cfg to contain the real max_vcpus value

2018-03-19 Thread Julien Grall
Hi Andrew, On 03/19/2018 07:13 PM, Andrew Cooper wrote: Make dom0_max_vcpus() a common interface, and implement it on ARM by splitting the existing alloc_dom0_vcpu0() function in half. As domain_create() doesn't yet set up the vcpu array, the max value is also passed into alloc_dom0_vcpu0(). T

Re: [Xen-devel] [PATCH 14/20] xen/gnttab: Remove replace_grant_supported()

2018-03-19 Thread Julien Grall
Hi Andrew, On 03/19/2018 07:13 PM, Andrew Cooper wrote: It is identical on all architecture, and this is a better overall than fixing it up to have a proper boolean return value. Signed-off-by: Andrew Cooper Reviewed-by: Julien Grall Cheers, --- CC: Jan Beulich CC: Stefano Stabellini C

[Xen-devel] [linux-4.9 test] 120913: tolerable FAIL - PUSHED

2018-03-19 Thread osstest service owner
flight 120913 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/120913/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 17 guest-stopfail like 120670 test-amd64-amd64-xl-qemuu-win7-amd64 17

Re: [Xen-devel] [PATCH 05/20] arm/boot: Mark construct_dom0() as __init

2018-03-19 Thread Julien Grall
Hi Andrew, On 03/19/2018 07:13 PM, Andrew Cooper wrote: Its sole caller, start_xen(), is __init. Actually, most of that files could benefits of __init as this is domain only build. In any case, this patch is already a good start. So: Acked-by: Julien Grall Cheers, Signed-off-by: Andre

Re: [Xen-devel] Xen ARM Community Call Wednesday 4th April 4PM UTC

2018-03-19 Thread Julien Grall
On 03/16/2018 09:57 AM, Julien Grall wrote: On 16/03/18 00:08, Stefano Stabellini wrote: Hi all, Hi Stefano, I suggest to have the next community call on Wednesday 4th April 4PM UTC. Keep in mind that due to Daylight Savings Time 4PM UTC is the usual time slot: 9AM California, 5PM UK. Does

Re: [Xen-devel] [PATCH v2 45/45] ARM: VGIC: wire new VGIC(-v2) files into Xen build system

2018-03-19 Thread Julien Grall
Hi Andre, On 03/15/2018 08:30 PM, Andre Przywara wrote: diff --git a/xen/arch/arm/vgic/Makefile b/xen/arch/arm/vgic/Makefile new file mode 100644 index 00..806826948e --- /dev/null +++ b/xen/arch/arm/vgic/Makefile @@ -0,0 +1,5 @@ +obj-y += vgic.o +obj-y += vgic-v2.o +obj-y += vgic-mmio.o

Re: [Xen-devel] [PATCH v2 43/45] ARM: new VGIC: vgic-init: implement map_resources

2018-03-19 Thread Julien Grall
Hi Andre, On 03/15/2018 08:30 PM, Andre Przywara wrote: map_resources is the last initialization step needed before the first VCPU is run. At that stage the code stores the MMIO base addresses used. Also it registers the respective register frames with the MMIO framework. This is based on Linux

Re: [Xen-devel] [PATCH v2 42/45] ARM: new VGIC: vgic-init: implement vgic_init

2018-03-19 Thread Julien Grall
Hi Andre, On 03/15/2018 08:30 PM, Andre Przywara wrote: +/* INIT/DESTROY */ + +/** + * domain_vgic_init: initialize the dist data structures + * @d: domain pointer + * @nr_spis: number of SPIs + */ +int domain_vgic_init(struct domain *d, unsigned int nr_spis) +{ +struct vgic_dist *dist = &d-

Re: [Xen-devel] [PATCH v2 40/45] ARM: new VGIC: vgic-init: register VGIC

2018-03-19 Thread Julien Grall
Hi Andre, On 03/15/2018 08:30 PM, Andre Przywara wrote: diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c index 002fec57e6..4b9664f313 100644 --- a/xen/arch/arm/vgic/vgic.c +++ b/xen/arch/arm/vgic/vgic.c @@ -946,6 +946,28 @@ void vgic_sync_hardware_irq(struct domain *d, spin

Re: [Xen-devel] [PATCH v2 09/45] ARM: GIC: Allow tweaking the active and pending state of an IRQ

2018-03-19 Thread Julien Grall
Hi Andre, On 03/19/2018 05:54 PM, Andre Przywara wrote: Which helpers? The set_{pending,active}_state() functions? I already put some kind of warning before the (wrapper) prototypes: /* * Set the active state of an IRQ. This should be used with care, as * this directly forces the active bit,

Re: [Xen-devel] [RFC PATCH 05/12] hvmloader: add Q35 DSDT table loading

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 14:45:29 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:50AM +1000, Alexey Gerasimenko wrote: >> Allows to select Q35 DSDT table in hvmloader_acpi_build_tables(). >> Function get_pc_machine_type() is used to select a proper table >> (i440/q35). >> >> As we are bo

Re: [Xen-devel] [RFC PATCH 04/12] hvmloader: add ACPI enabling for Q35

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 13:01:58 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:49AM +1000, Alexey Gerasimenko wrote: >> In order to turn on ACPI for OS, we need to write a chipset-specific >> value to SMI_CMD register (sort of imitation of the APM->ACPI switch >> on real systems). Modif

[Xen-devel] [linux-3.18 test] 120911: regressions - FAIL

2018-03-19 Thread osstest service owner
flight 120911 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/120911/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-debianhvm-amd64 16 guest-localmigrate/x10 fail REGR. vs. 120780 Tests whi

Re: [Xen-devel] [RFC PATCH 06/12] hvmloader: add basic Q35 support

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 15:30:14 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:51AM +1000, Alexey Gerasimenko wrote: >> This patch does following: >> >> 1. Move PCI-device specific initialization out of pci_setup function >> to the newly created class_specific_pci_device_setup function

Re: [Xen-devel] [PATCH RESEND v2 0/2] drm/xen-front: Add support for Xen PV display frontend

2018-03-19 Thread Boris Ostrovsky
On 03/13/2018 12:21 PM, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Hello! > > Resending with all the patches squashed on Daniel's request. Which of the two series are we supposed to review? The 8-patch one or this? (I hope it's the former) -boris _

Re: [Xen-devel] [PATCH v2] xen: fix null sched build with debug=n

2018-03-19 Thread Dario Faggioli
On Mon, 2018-03-19 at 13:41 -0500, Doug Goldstein wrote: > The null_dom() static inline is just used when debug=y so it results > in > a error with the default CFLAGS and debug=n. This function is used in > only one place and it a one line helper so remove it until we > actually > need it. > > Sig

Re: [Xen-devel] [PATCH] x86/xen: Delay get_cpu_cap until stack canary is established

2018-03-19 Thread Boris Ostrovsky
On 03/19/2018 12:58 PM, Jason Andryuk wrote: > Commit 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") introduced a > call to get_cpu_cap, which is fstack-protected. This is works on x86-64 s/This is works/This works/ Reviewed-by: Boris Ostrovsky Do we still need 4f277295e54? -boris > as

Re: [Xen-devel] [RFC PATCH 08/12] libxl: Q35 support (new option device_model_machine)

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 17:01:18 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:53AM +1000, Alexey Gerasimenko wrote: >> Provide a new domain config option to select the emulated machine >> type, device_model_machine. It has following possible values: >> - "i440" - i440 emulation (defaul

Re: [Xen-devel] [PATCH 28/57] ARM: new VGIC: Add acccessor to new struct vgic_irq instance

2018-03-19 Thread Julien Grall
On 03/19/2018 05:32 PM, Andre Przywara wrote: Hi, Hi, On 06/03/18 18:13, Julien Grall wrote: Hi Andre, On 05/03/18 16:03, Andre Przywara wrote: The new VGIC implementation centers around a struct vgic_irq instance per virtual IRQ. Provide a function to retrieve the right instance for a g

Re: [Xen-devel] [RFC PATCH 10/12] libacpi: build ACPI MCFG table if requested

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 17:33:34 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:55AM +1000, Alexey Gerasimenko wrote: >> This adds construct_mcfg() function to libacpi which allows to build >> MCFG table for a given mmconfig_addr/mmconfig_len pair if the >> ACPI_HAS_MCFG flag was specifi

Re: [Xen-devel] [PATCH 11/20] xen/domctl: Merge set_gnttab_limits into createdomain

2018-03-19 Thread Christian Lindig
> On 19. Mar 2018, at 19:13, Andrew Cooper wrote: > > + max_grant_frames: int32; > + max_maptrack_frames: int32; As part of: > +type domctl_create_config = > +{ > + ssidref: int32; > + handle: string; > + flags: domain_create_flag list; > + max_vcpus: int32; >

Re: [Xen-devel] [RFC PATCH 11/12] hvmloader: use libacpi to build MCFG table

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 17:49:09 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:56AM +1000, Alexey Gerasimenko wrote: >> This patch extends hvmloader_acpi_build_tables() with code which >> detects if MMCONFIG is available -- i.e. initialized and enabled >> (+we're running on Q35), obtain

[Xen-devel] [xen-4.7-testing test] 120908: regressions - trouble: broken/fail/pass

2018-03-19 Thread osstest service owner
flight 120908 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/120908/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 broken test-amd64-amd64-xl-qemuu-win7

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 15:58:02 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:52AM +1000, Alexey Gerasimenko wrote: >> Much like normal PCI BARs or other chipset-specific memory-mapped >> resources, MMCONFIG area needs space in MMIO hole, so we must >> allocate it manually. >> >> The

[Xen-devel] [PATCH 18/20] xen/dom0: Arrange for dom0_cfg to contain the real max_vcpus value

2018-03-19 Thread Andrew Cooper
Make dom0_max_vcpus() a common interface, and implement it on ARM by splitting the existing alloc_dom0_vcpu0() function in half. As domain_create() doesn't yet set up the vcpu array, the max value is also passed into alloc_dom0_vcpu0(). This is temporary for bisectibility and removed in the follo

[Xen-devel] [PATCH 15/20] xen/gnttab: Export opt_max_{grant, maptrack}_frames

2018-03-19 Thread Andrew Cooper
This is to facilitate the values being passed in via domain_create(), at which point the dom0 construction code needs to know them. While cleaning up, drop the DEFAULT_* defines, which are only used immediately adjacent in a context which makes it obvious that they are the defaults, and drop the (

[Xen-devel] [PATCH 10/20] xen/domctl: Merge set_max_evtchn into createdomain

2018-03-19 Thread Andrew Cooper
set_max_evtchn is somewhat weird. It was introduced with the event_fifo work, but has never been used. Still, it is a bounding on resources consumed by the event channel infrastructure, and should be part of createdomain, rather than editable after the fact. Drop XEN_DOMCTL_set_max_evtchn comple

[Xen-devel] [PATCH 12/20] xen/domctl: Merge max_vcpus into createdomain

2018-03-19 Thread Andrew Cooper
XEN_DOMCTL_max_vcpus is a mandatory hypercall, but nothing actually prevents a toolstack from unpausing a domain with no vcpus. Originally, d->vcpus[] was an embedded array in struct domain, but c/s fb442e217 "x86_64: allow more vCPU-s per guest" in Xen 4.0 altered it to being dynamically allocate

[Xen-devel] [PATCH 16/20] xen/gnttab: Pass max_{grant, maptrack}_frames into grant_table_create()

2018-03-19 Thread Andrew Cooper
... rather than setting the limits up after domain_create() has completed. This removes all the gnttab infrastructure for calculating the number of dom0 grant frames, opting instead to require the dom0 construction code to pass a sane value in via the configuration. In practice, this now means th

[Xen-devel] [PATCH 17/20] xen/gnttab: Fold grant_table_{create, set_limits}() into grant_table_init()

2018-03-19 Thread Andrew Cooper
Now that the max_{grant,maptrack}_frames are specified from the very beginning of grant table construction, the various initialisation functions can be folded together and simplified as a result. Leave grant_table_init() as the public interface, which is more consistent with other subsystems. Sig

[Xen-devel] [PATCH 19/20] xen/domain: Call arch_domain_create() as early as possible in domain_create()

2018-03-19 Thread Andrew Cooper
This is in preparation to set up d->max_cpus and d->vcpu[] in arch_domain_create(), and allow later parts of domain construction to have access to the values. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall --- xen/common/domain.c | 34

[Xen-devel] [PATCH 14/20] xen/gnttab: Remove replace_grant_supported()

2018-03-19 Thread Andrew Cooper
It is identical on all architecture, and this is a better overall than fixing it up to have a proper boolean return value. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall --- xen/common/grant_table.c | 3 --- xen/include/asm-arm/grant_table.h

[Xen-devel] [PATCH 13/20] xen/evtchn: Pass max_evtchn_port into evtchn_init()

2018-03-19 Thread Andrew Cooper
... rather than setting it up domain_create() has completed. This involves constructing a default value for dom0. No practical change in functionality. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall --- xen/arch/arm/setup.c | 4 +++- xen/arch/

[Xen-devel] [PATCH 20/20] xen/domain: Allocate d->vcpu[] in arch_domain_create()

2018-03-19 Thread Andrew Cooper
On the ARM side, audit config->max_vcpus after the vgic has been initialised, at which point we have a real upper bound to test against. This allows for the removal of the vgic_max_vcpus() juggling to cope with the call from evtchn_init() before the vgic settings are known. For each arch's dom0's

[Xen-devel] [PATCH 11/20] xen/domctl: Merge set_gnttab_limits into createdomain

2018-03-19 Thread Andrew Cooper
XEN_DOMCTL_set_gnttab_limits is a fairly new hypercall, and is strictly mandatory. Adding support for it introduced a state where a domain has a mostly un-constructed grant table, and there were cases where mis-ordering of toolstack hypercalls could cause a NULL pointer deference in the hypervisor

[Xen-devel] [PATCH 07/20] tools/ocaml: Drop int_array_of_uuid_string()

2018-03-19 Thread Andrew Cooper
This function is entirely internal to xenctrl stubs, and serves only to convert the uuid string to an integer array (making 16 memory allocations as it goes), while the C stubs turns the integer array back into a binary array. Instead, pass the string all the way down into C, and have sscanf() unp

[Xen-devel] [PATCH 01/20] tools/libxl: Drop xc_domain_configuration_t from libxl__domain_build_state

2018-03-19 Thread Andrew Cooper
The data it stores is initialised and exclusively used within libxl__domain_make(), with the important details written back elsewhere by libxl__arch_domain_save_config(). Prepare xc_config on libxl__domain_make()'s stack, and drop the parameter. Signed-off-by: Andrew Cooper --- CC: Ian Jackson

[Xen-devel] [PATCH 08/20] tools/ocaml: Pass a full domctl_create_config into stub_xc_domain_create()

2018-03-19 Thread Andrew Cooper
The underlying C function is about to make the same change, and the structure is going to gain extra fields. Signed-off-by: Andrew Cooper --- CC: Christian Lindig CC: David Scott CC: Jon Ludlam CC: Rob Hoes --- tools/ocaml/libs/xc/xenctrl.ml | 14 ++--- tools/ocaml/libs/xc/xenct

[Xen-devel] [PATCH 02/20] tools/libxl: Don't prepare or save xc_config when soft resetting a domain

2018-03-19 Thread Andrew Cooper
xc_config is only used by xc_domain_create(), but by calling libxl__arch_domain_{prepare,save}_config() we clobber the real settings with the default settings. Move all data and calls relating to xc_domain_create() into the path which calls it. As far as I can tell, soft_reset has always been bro

[Xen-devel] [PATCH 06/20] tools/ocaml: Drop domain_create_flag_table[]

2018-03-19 Thread Andrew Cooper
This is a logarithm in disguise. Update the logic to match how x86_arch_emulation_flags works in c/s 9d683b5e37 and b38d96f596. Signed-off-by: Andrew Cooper --- CC: Christian Lindig CC: David Scott CC: Jon Ludlam CC: Rob Hoes --- tools/ocaml/libs/xc/xenctrl_stubs.c | 11 ++- 1 file

[Xen-devel] [PATCH 09/20] tools: Rework xc_domain_create() to take a full xen_domctl_createdomain

2018-03-19 Thread Andrew Cooper
In future patches, the structure will be extended with further information, and this is far cleaner than adding extra parameters. The python stubs are the only user which passes NULL for the existing config option (which is actually the arch substructure). Therefore, the #ifdefary moves to compen

[Xen-devel] [PATCH 04/20] xen/domctl: Drop vcpu_alloc_lock

2018-03-19 Thread Andrew Cooper
It is not entirely clear why this interlock was introduced in c/s 8cbb5278e "x86/AMD: Add support for AMD's OSVW feature in guests". At the time, svm_handle_osvw() could have seen an unexpected change in OSVW (not the case now, due to the new CPUID Policy infrastructure), but even then, it would h

[Xen-devel] [PATCH For-4.11 00/20] Improvements to domain creation

2018-03-19 Thread Andrew Cooper
The purpose of this patch series is for the final patch. See the commit message for details. Patches 1 and 2 have been posted before, but are included here as they are required for the eventual functionality. This series can be found in git form here: http://xenbits.xen.org/gitweb/?p=people/a

[Xen-devel] [PATCH 03/20] xen/public: Rename xen_domctl_createdomain.config to arch

2018-03-19 Thread Andrew Cooper
This is a tools only hypercall so fine to change. Altering the name avoids having confusing code such as config->config all over the hypervisor and toolstack. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Ian Jackson CC: Wei Liu --- tools/libx

[Xen-devel] [PATCH 05/20] arm/boot: Mark construct_dom0() as __init

2018-03-19 Thread Andrew Cooper
Its sole caller, start_xen(), is __init. Signed-off-by: Andrew Cooper --- CC: Stefano Stabellini CC: Julien Grall --- xen/arch/arm/domain_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 28ee876..9ef9030

[Xen-devel] broken build: 448c03b3cbe14873ee637755a29ea26ee7ca9ef9

2018-03-19 Thread Doug Goldstein
commit 448c03b3cbe14873ee637755a29ea26ee7ca9ef9 Author: Juergen Gross Date: Mon Feb 26 09:46:12 2018 +0100 This commit breaks the build of qemu-xen-traditional for: Ubuntu 14.04: https://gitlab.com/cardoe/xen/-/jobs/58266170 Ubuntu 16.04: https://gitlab.com/cardoe/xen/-/jobs/58266174 A short

[Xen-devel] [PATCH v2] xen: fix null sched build with debug=n

2018-03-19 Thread Doug Goldstein
The null_dom() static inline is just used when debug=y so it results in a error with the default CFLAGS and debug=n. This function is used in only one place and it a one line helper so remove it until we actually need it. Signed-off-by: Doug Goldstein --- environment: Debian stretch compiler: cla

Re: [Xen-devel] [RFC PATCH 11/12] hvmloader: use libacpi to build MCFG table

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:56AM +1000, Alexey Gerasimenko wrote: > This patch extends hvmloader_acpi_build_tables() with code which detects > if MMCONFIG is available -- i.e. initialized and enabled (+we're running > on Q35), obtains its base address and size and asks libacpi to build MCFG > tab

Re: [Xen-devel] [PATCH v2 09/45] ARM: GIC: Allow tweaking the active and pending state of an IRQ

2018-03-19 Thread Andre Przywara
Hi, On 19/03/18 09:30, Julien Grall wrote: > > > On 03/16/2018 04:05 PM, Andre Przywara wrote: >> Hi, > > Hi Andre, > >> On 15/03/18 20:30, Andre Przywara wrote: >>> +    } >>> +} >>> + >>> +static void gicv2_set_pending_state(struct irq_desc *irqd, bool >>> pending) >>> +{ >>> +    ASSERT(spi

Re: [Xen-devel] [RFC PATCH 10/12] libacpi: build ACPI MCFG table if requested

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:55AM +1000, Alexey Gerasimenko wrote: > This adds construct_mcfg() function to libacpi which allows to build MCFG > table for a given mmconfig_addr/mmconfig_len pair if the ACPI_HAS_MCFG > flag was specified in acpi_config struct. > > The maximum bus number is calcula

Re: [Xen-devel] [PATCH v2 19/45] ARM: new VGIC: Add IRQ sync/flush framework

2018-03-19 Thread Andre Przywara
Hi, On 19/03/18 14:17, Julien Grall wrote: > Hi, > > On 03/15/2018 08:30 PM, Andre Przywara wrote: >> Implement the framework for syncing IRQs between our emulation and the >> list registers, which represent the guest's view of IRQs. >> This is done in vgic_sync_from_lrs() and vgic_sync_to_lrs(),

Re: [Xen-devel] [PATCH 28/57] ARM: new VGIC: Add acccessor to new struct vgic_irq instance

2018-03-19 Thread Andre Przywara
Hi, On 06/03/18 18:13, Julien Grall wrote: > Hi Andre, > > On 05/03/18 16:03, Andre Przywara wrote: >> The new VGIC implementation centers around a struct vgic_irq instance >> per virtual IRQ. >> Provide a function to retrieve the right instance for a given IRQ >> number and (in case of private i

Re: [Xen-devel] [RFC PATCH 08/12] libxl: Q35 support (new option device_model_machine)

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:53AM +1000, Alexey Gerasimenko wrote: > Provide a new domain config option to select the emulated machine type, > device_model_machine. It has following possible values: > - "i440" - i440 emulation (default) > - "q35" - emulate a Q35 machine. By default, the storage in

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

2018-03-19 Thread Paul Durrant
> -Original Message- [snip] > >> How are you making sure this is a mapping that was established via > >> the map op? Without that this can be (ab)used to ... > >> > >> > +put_page(page); > >> > >> ... underflow the refcount of a page. > >> > > > > Yes, I guess I need to ensure that only

Re: [Xen-devel] [PATCH 2/3] x86/pv: Fold {compat_}unregister_guest_callback() into its non-compat counterpart

2018-03-19 Thread Jan Beulich
>>> On 15.03.18 at 12:58, wrote: > These functions are almost identical. They differ only in the error emitted > for the use of CALLBACKTYPE_syscall (which is inconsequential to guests), I'm not entirely convinced - so far there's been a match here between map and unmap, i.e. with the change it

Re: [Xen-devel] [PATCH 1/3] x86/pv: Avoid locked bit manipulation in register_guest_callback()

2018-03-19 Thread Jan Beulich
>>> On 15.03.18 at 12:58, wrote: > Changes to arch.vgc_flags are made to current in syncrhonous context only, and > don't need to be locked. (The only other changes are via > arch_set_info_guest(), which operates on descheduled vcpus only). > > Replace the {set,clear}_bit() calls with compiler-v

[Xen-devel] [RFC PATCH] Make Security Policy Doc ready to become a CNA

2018-03-19 Thread Lars Kurth
And this time with patch: note to myself - never try sendmail with --compose again (-; This patch contains a proposal to change https://xenproject.org/security-policy.html such that it points to SUPPORT.md. Having scope and process information is necessary to become a CNA. This is the last pie

[Xen-devel] [PATCH] x86/xen: Delay get_cpu_cap until stack canary is established

2018-03-19 Thread Jason Andryuk
Commit 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") introduced a call to get_cpu_cap, which is fstack-protected. This is works on x86-64 as commit 4f277295e54c ("x86/xen: init %gs very early to avoid page faults with stack protector") ensures the stack protector is configured, but it it did

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

2018-03-19 Thread Jan Beulich
>>> On 19.03.18 at 16:34, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 19 March 2018 15:12 >> >> >>> On 12.02.18 at 11:47, wrote: >> > This patch adds iommu_ops to allow a domain with control_iommu >> privilege >> > to map and unmap pages from any guest over which it has mappi

Re: [Xen-devel] What is the option 'e' used for in 'xl create' command

2018-03-19 Thread Stefano Stabellini
On Mon, 19 Mar 2018, Dongli Zhang wrote: > Hi, > > There is an 'e' option when running the following xl command: > > - xl create > - xl restore > - xl migrate > - xl remus > > The 'e' option is used to "Do not wait in the background (on ) for the > death of the domain". This option dates back to

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-03-19 Thread Jan Beulich
>>> On 19.03.18 at 16:36, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 19 March 2018 15:14 >> >> >>> On 12.02.18 at 11:47, wrote: >> > --- a/xen/arch/x86/iommu_op.c >> > +++ b/xen/arch/x86/iommu_op.c >> > @@ -22,6 +22,58 @@ >> > #include >> > #include >> > #include >> >

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-03-19 Thread Jan Beulich
>>> On 19.03.18 at 16:13, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 19 March 2018 14:10 >> >> >>> On 12.02.18 at 11:47, wrote: >> > +for ( j = 0; \ >> > + j < min_t(unsigned int, (_d_)->nr_entries, \ >> > +

Re: [Xen-devel] [RFC PATCH 03/12] hvmloader: add function to query an emulated machine type (i440/Q35)

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 12:56:51 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:48AM +1000, Alexey Gerasimenko wrote: >> This adds a new function get_pc_machine_type() which allows to >> determine the emulated chipset type. Supported return values: >> >> - MACHINE_TYPE_I440 >> - MACHINE

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:52AM +1000, Alexey Gerasimenko wrote: > Much like normal PCI BARs or other chipset-specific memory-mapped > resources, MMCONFIG area needs space in MMIO hole, so we must allocate > it manually. > > The actual MMCONFIG size depends on a number of PCI buses available wh

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

2018-03-19 Thread osstest service owner
flight 120897 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/120897/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm broken in 120734 test-amd64-amd64-qemuu-n

[Xen-devel] [RFC Patch] Make Security Policy Doc ready to become a CNA

2018-03-19 Thread Lars Kurth
This contains a proposal to change https://xenproject.org/security-policy.html such that it points to SUPPORT.md. Having scope and process information is necessary to become a CNA. This is the last piece, before formally asking to become a CNA. To make the review of this easier, I based it on xe

Re: [Xen-devel] [PATCH v2 31/45] ARM: new VGIC: Add SGIR register handler

2018-03-19 Thread Andre Przywara
Hi, On 19/03/18 09:47, Julien Grall wrote: > Hi Andre, > > On 03/15/2018 08:30 PM, Andre Przywara wrote: >> Triggering an IPI via this register is v2 specific, so the >> implementation lives entirely in vgic-mmio-v2.c. >> >> This is based on Linux commit 55cc01fb9004, written by Andre Przywara. >

Re: [Xen-devel] [PATCH v10 07/11] vpci/bars: add handlers to map the BARs

2018-03-19 Thread Jan Beulich
>>> On 16.03.18 at 14:30, wrote: > +static int map_range(unsigned long s, unsigned long e, void *data, > + unsigned long *c) > +{ > +const struct map_data *map = data; > +int rc; > + > +for ( ; ; ) > +{ > +unsigned long size = e - s + 1; > + > +/

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-03-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 19 March 2018 15:14 > To: Paul Durrant > Cc: Andrew Cooper ; Wei Liu > ; George Dunlap ; Ian > Jackson ; Stefano Stabellini > ; xen-devel@lists.xenproject.org; Konrad Rzeszutek > Wilk ; Tim (Xen.org) > Subject: Re

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

2018-03-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 19 March 2018 15:12 > To: Paul Durrant > Cc: Andrew Cooper ; Wei Liu > ; George Dunlap ; Ian > Jackson ; Stefano Stabellini > ; xen-devel@lists.xenproject.org; Konrad Rzeszutek > Wilk ; Tim (Xen.org) > Subject: Re

Re: [Xen-devel] [RFC PATCH 06/12] hvmloader: add basic Q35 support

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:51AM +1000, Alexey Gerasimenko wrote: > This patch does following: > > 1. Move PCI-device specific initialization out of pci_setup function > to the newly created class_specific_pci_device_setup function to simplify > code. > > 2. PCI-device specific initialization e

Re: [Xen-devel] [PATCH v1] hvm/svm: Implement Debug events

2018-03-19 Thread Alexandru Stefan ISAILA
On Lu, 2018-03-19 at 14:22 +, Andrew Cooper wrote: > On 19/03/18 14:07, Alexandru Isaila wrote: > > > > -case VMEXIT_EXCEPTION_BP: > > -inst_len = __get_instruction_length(v, INSTR_INT3); > > +case VMEXIT_EXCEPTION_BP:; > > +inst_len = vmcb->nextrip - vmcb->rip; > Sorry

Re: [Xen-devel] Xen ARM Community Call Wednesday 4th April 4PM UTC

2018-03-19 Thread Stefano Stabellini
Hello Ajmal, I was planning to send a remider few days before the call with the call details, but let me paste them also here: Join the call: https://www.uberconference.com/stefano-stabellini Optional dial in number: 669-999-0613 No PIN needed International call-in numbers are available on the w

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-03-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 19 March 2018 14:10 > To: Paul Durrant > Cc: Andrew Cooper ; Wei Liu > ; George Dunlap ; Ian > Jackson ; Stefano Stabellini > ; xen-devel@lists.xenproject.org; Konrad Rzeszutek > Wilk ; Tim (Xen.org) > Subject: Re

Re: [Xen-devel] [PATCH RESEND v2 1/2] drm/xen-front: Add support for Xen PV display frontend

2018-03-19 Thread Daniel Vetter
On Mon, Mar 19, 2018 at 3:19 PM, Oleksandr Andrushchenko wrote: > On 03/19/2018 03:51 PM, Daniel Vetter wrote: >> >> On Fri, Mar 16, 2018 at 12:52:09PM +0200, Oleksandr Andrushchenko wrote: >>> >>> Hi, Daniel! >>> Sorry, if I strip the patch too much below. >>> >>> On 03/16/2018 10:23 AM, Daniel V

Re: [Xen-devel] [PATCH 5/5] hvmloader: Use iPXE ROM loaded from a standalone file

2018-03-19 Thread Jan Beulich
>>> On 19.03.18 at 15:24, wrote: > On 16/03/18 11:26, Jan Beulich wrote: >>> >>> +/* Physical address of iPXE ROM, loaded by domain builder >>> + * when using ROMBIOS >>> + */ >>> +unsigned int *ipxe_rom_addresss; >> Comment style. And can the pointer be to const? > > I will fixup

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-03-19 Thread Jan Beulich
>>> On 12.02.18 at 11:47, wrote: > --- a/xen/arch/x86/iommu_op.c > +++ b/xen/arch/x86/iommu_op.c > @@ -22,6 +22,58 @@ > #include > #include > #include > +#include > + > +struct get_rdm_ctxt { > +unsigned int max_entries; > +unsigned int nr_entries; > +XEN_GUEST_HANDLE(xen_iommu_

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

2018-03-19 Thread Jan Beulich
>>> On 12.02.18 at 11:47, wrote: > This patch adds iommu_ops to allow a domain with control_iommu privilege > to map and unmap pages from any guest over which it has mapping privilege > in the IOMMU. > These operations implicitly disable IOTLB flushing so that the caller can > batch operations and

Re: [Xen-devel] [RFC PATCH 09/12] libxl: Xen Platform device support for Q35

2018-03-19 Thread Alexey G
On Tue, 13 Mar 2018 04:33:54 +1000 Alexey Gerasimenko wrote: >Current Xen/QEMU method to control Xen Platform device is a bit odd -- >changing 'xen_platform_device' option value actually modifies QEMU >emulated machine type, namely xenfv <--> pc. > >In order to avoid multiplying machine types, us

Re: [Xen-devel] [PATCH v1] hvm/svm: Implement Debug events

2018-03-19 Thread Razvan Cojocaru
On 03/19/2018 04:48 PM, Tamas K Lengyel wrote: > On Mon, Mar 19, 2018 at 8:07 AM, Alexandru Isaila > wrote: >> At this moment the Debug events for the AMD architecture are not >> forwarded to the monitor layer. >> >> This patch adds the Debug event to the common capabilities, adds >> the VMEXIT_IC

Re: [Xen-devel] [RFC PATCH 05/12] hvmloader: add Q35 DSDT table loading

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:50AM +1000, Alexey Gerasimenko wrote: > Allows to select Q35 DSDT table in hvmloader_acpi_build_tables(). Function > get_pc_machine_type() is used to select a proper table (i440/q35). > > As we are bound to the qemu-xen device model for Q35, no need > to initialize co

Re: [Xen-devel] [PATCH v1] hvm/svm: Implement Debug events

2018-03-19 Thread Tamas K Lengyel
On Mon, Mar 19, 2018 at 8:07 AM, Alexandru Isaila wrote: > At this moment the Debug events for the AMD architecture are not > forwarded to the monitor layer. > > This patch adds the Debug event to the common capabilities, adds > the VMEXIT_ICEBP then forwards the event to the monitor layer. > > Ch

Re: [Xen-devel] [PATCH 3/5] libxc: Allow loading of firmware modules for HVM guest

2018-03-19 Thread Anoob Soman
On 18/03/18 01:32, Doug Goldstein wrote: On 3/15/18 12:31 PM, Anoob Soman wrote: This allows to load iPXE rom as a firmware module, instead of requiring it to be embedded into hvmloader. Signed-off-by: Anoob Soman --- tools/libxc/xc_dom_x86.c | 13 + 1 file changed, 13 insertion

Re: [Xen-devel] [PATCH v1] hvm/svm: Implement Debug events

2018-03-19 Thread Andrew Cooper
On 19/03/18 14:07, Alexandru Isaila wrote: > -case VMEXIT_EXCEPTION_BP: > -inst_len = __get_instruction_length(v, INSTR_INT3); > +case VMEXIT_EXCEPTION_BP:; > +inst_len = vmcb->nextrip - vmcb->rip; Sorry, but no.  This will break on older AMD hardware.  You must retain the

Re: [Xen-devel] [PATCH 5/5] hvmloader: Use iPXE ROM loaded from a standalone file

2018-03-19 Thread Anoob Soman
On 16/03/18 11:26, Jan Beulich wrote: +/* Physical address of iPXE ROM, loaded by domain builder + * when using ROMBIOS + */ +unsigned int *ipxe_rom_addresss; Comment style. And can the pointer be to const? I will fixup the comment style and but making ipxe_rom_address a point

Re: [Xen-devel] [PATCH RESEND v2 1/2] drm/xen-front: Add support for Xen PV display frontend

2018-03-19 Thread Oleksandr Andrushchenko
On 03/19/2018 03:51 PM, Daniel Vetter wrote: On Fri, Mar 16, 2018 at 12:52:09PM +0200, Oleksandr Andrushchenko wrote: Hi, Daniel! Sorry, if I strip the patch too much below. On 03/16/2018 10:23 AM, Daniel Vetter wrote: S-o-b line went missing here :-) will restore it back ;) I've read throug

Re: [Xen-devel] [RFC PATCH 02/12] Makefile: build and use new DSDT table for Q35

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 12:46:05 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:47AM +1000, Alexey Gerasimenko wrote: >> Provide building for newly added dsdt_q35.asl file, in a way similar >> to dsdt.asl. >> >> Note that '15cpu' ACPI tables are only applicable to qemu-traditional >> (w

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-03-19 Thread Jan Beulich
>>> On 12.02.18 at 11:47, wrote: > --- a/xen/arch/x86/iommu_op.c > +++ b/xen/arch/x86/iommu_op.c > @@ -22,6 +22,58 @@ > #include > #include > #include > +#include > + > +struct get_rdm_ctxt { > +unsigned int max_entries; > +unsigned int nr_entries; > +XEN_GUEST_HANDLE(xen_iommu_

Re: [Xen-devel] [RFC PATCH 02/12] Makefile: build and use new DSDT table for Q35

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 07:07:34 -0600 "Jan Beulich" wrote: On 12.03.18 at 19:33, wrote: >> --- a/tools/firmware/hvmloader/Makefile >> +++ b/tools/firmware/hvmloader/Makefile >> @@ -75,7 +75,7 @@ rombios.o: roms.inc >> smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\"" >> >> A

[Xen-devel] [PATCH v1] hvm/svm: Implement Debug events

2018-03-19 Thread Alexandru Isaila
At this moment the Debug events for the AMD architecture are not forwarded to the monitor layer. This patch adds the Debug event to the common capabilities, adds the VMEXIT_ICEBP then forwards the event to the monitor layer. Chapter 2: SVM Processor and Platform Extensions: "Note: A vector 1 exce

[Xen-devel] [qemu-mainline bisection] complete test-amd64-amd64-qemuu-nested-amd

2018-03-19 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-qemuu-nested-amd testid xen-boot/l1 Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://git

Re: [Xen-devel] [RFC PATCH 01/12] libacpi: new DSDT ACPI table for Q35

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 12:43:05 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:46AM +1000, Alexey Gerasimenko wrote: >> This patch adds the DSDT table for Q35 (new >> tools/libacpi/dsdt_q35.asl file). There are not many differences >> with dsdt.asl (for i440) at the moment, namely: >>

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 15 March 2018 13:04 > To: xen-devel > Cc: Andrew Cooper ; Paul Durrant > ; George Dunlap > Subject: [PATCH v5 03/14] x86emul: abstract out XCRn accesses > > Use hooks, just like done for other special purpose reg

  1   2   >