Re: [Xen-devel] [RFC 00/16] Old GIC (gic-vgic) optimizations for GICV2

2018-11-28 Thread Andrii Anisov
Hello, Again, I sent this cover letter only to myself. So, here it is, hope it does not break the thread. Sorry for the mess. From: Andrii Anisov Sent: Wednesday, November 28, 2018 11:31 PM Cc: Andrii Anisov Subject: [RFC 00/16] Old GIC (gic-vgic) optimizations for GICV2   From: Andrii

[Xen-devel] Xen support on ARM64

2018-11-28 Thread Omkar Bolla
Hi, I just wanted to run xen hypervisor on ARMv8 architecture, I tried on Hikey960 platform which has armv8, but latest xen giving cpu errors. Could you please tell me, on which platforms latest xen is working? Thanks, Omkar B ___ Xen-devel mailing

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

2018-11-28 Thread osstest service owner
flight 130825 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/130825/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-dmrestrict-amd64-dmrestrict 7 xen-boot fail REGR. vs. 129817 Tests

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Shuah Khan
On Wed, Nov 28, 2018 at 12:48 PM Russell King - ARM Linux wrote: > > On Wed, Nov 28, 2018 at 11:27:17AM -0800, David Miller wrote: > > From: Linus Torvalds > > Date: Wed, 28 Nov 2018 10:00:06 -0800 > > > > > Not all memory is accessible even to the kernel. If you have memory > > > that shows up

Re: [Xen-devel] [PATCH] xen: xlate_mmu: add missing header to fix 'W=1' warning

2018-11-28 Thread Joey Pabalinas
On Tue, Nov 27, 2018 at 07:53:27PM +0530, Srikanth Boddepalli wrote: > Add a missing header otherwise compiler warns about missed prototype: > > drivers/xen/xlate_mmu.c:183:5: warning: no previous prototype for > 'xen_xlate_unmap_gfn_range?' [-Wmissing-prototypes] > int

[Xen-devel] [PATCH] xen-blkfront: use old rinfo after enomem during migration

2018-11-28 Thread Manjunath Patil
Hi, Feel free to suggest/comment on this. I am trying to do the following at dst during the migration now. 1. Dont clear the old rinfo in blkif_free(). Instead just clean it. 2. Store the old rinfo and nr_rings into temp variables in negotiate_mq() 3. let nr_rings get re-calculated based on

Re: [Xen-devel] [PATCH v4 6/6] x86/microcode: Synchronize late microcode loading

2018-11-28 Thread Chao Gao
On Wed, Nov 28, 2018 at 04:22:09PM +0100, Roger Pau Monné wrote: >On Wed, Nov 28, 2018 at 01:34:16PM +0800, Chao Gao wrote: >> This patch ports microcode improvement patches from linux kernel. >> >> Before you read any further: the early loading method is still the >> preferred one and you should

[Xen-devel] [libvirt test] 130824: regressions - FAIL

2018-11-28 Thread osstest service owner
flight 130824 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/130824/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 129914

Re: [Xen-devel] [PATCH v4 4/6] microcode: don't call apply_microcode() in cpu_request_microcode()

2018-11-28 Thread Chao Gao
On Wed, Nov 28, 2018 at 04:02:25PM +0100, Roger Pau Monné wrote: >On Wed, Nov 28, 2018 at 01:34:14PM +0800, Chao Gao wrote: >> cpu_request_microcode() will only parse microcode file and save >> suitable microcodes to microcode_cache. To update microcode, >> apply_microcode() should be invoked

Re: [Xen-devel] [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through

2018-11-28 Thread Martin K. Petersen
Gustavo A., > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Notice that, in this particular case, I replaced > "Missed the backend's Closing state -- fallthrough" with > "fall through - Missed the backend's Closing state",

Re: [Xen-devel] [PATCH v2 0/3] Remove tmem

2018-11-28 Thread Konrad Rzeszutek Wilk
On Wed, Nov 28, 2018 at 01:58:03PM +, Wei Liu wrote: > It is agreed that tmem can be removed from xen.git. See the thread starting > > > from . > > In this version: > > 1. Remove some residuals from previous

[Xen-devel] Look forward to your answer: What is different among the three cpu model types on xen :[application default] vs [hypervisor default] vs [copy host configuration]

2018-11-28 Thread John Wang
Hi Guys: I have a  big confusion about cpu configurations in virt-manager -> CPUs -> configuration (Refer to attachment) There are 3 type of model : copy host cpu configuration (like passthrough of kvm ); Application default; Hypervisor default.  I can not find any difference amount of them. 

Re: [Xen-devel] [PATCH v4 2/6] microcode: save all microcodes which pass sanity check

2018-11-28 Thread Chao Gao
On Wed, Nov 28, 2018 at 01:00:14PM +0100, Roger Pau Monné wrote: >On Wed, Nov 28, 2018 at 01:34:12PM +0800, Chao Gao wrote: >> ... and search caches to find a suitable one when loading. > >Why do you need to save all of them? You are only going to load a >single microcode, so I don't understand

Re: [Xen-devel] [PATCH v4 1/6] microcode/intel: extend microcode_update_match()

2018-11-28 Thread Chao Gao
On Wed, Nov 28, 2018 at 11:58:06AM +0100, Roger Pau Monné wrote: >On Wed, Nov 28, 2018 at 01:34:11PM +0800, Chao Gao wrote: >> to a more generic function. The benefit is that this function can be >> used to check whether a microcode is newer than another as well. We >> rely on this function to

[Xen-devel] [xen-4.10-testing test] 130820: regressions - FAIL

2018-11-28 Thread osstest service owner
flight 130820 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/130820/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-ws16-amd64 17 guest-stopfail REGR. vs. 129676 Tests which

[Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-11-28 Thread Hans van Kranenburg
Hi, As also seen at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914951 Attached there are two serial console output logs. One is starting with Xen 4.11 (from debian unstable) as dom0, and the other one without Xen. [2.085543] BUG: unable to handle kernel paging request at

Re: [Xen-devel] [PATCH 0/2] Move RSDP address out of setup_header

2018-11-28 Thread Hans van Kranenburg
Hi, On 11/20/18 8:25 AM, Juergen Gross wrote: > Resend with Daniel's mailo address corrected > > Instead of passing the RSDP address for Xen PVH guests from grub2 to > the kernel in setup_header move it into the non-legacy part of the > boot_params structure. > > This patch series should be

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

2018-11-28 Thread Marek Marczykowski-Górecki
On Mon, Nov 12, 2018 at 01:52:49PM +, Ian Jackson wrote: > Marek Marczykowski-Górecki writes ("Re: [Xen-devel] [PATCH v2 11/11] > tools/libvchan: libxenvchan_client_init: use ENOENT for no server"): > > Since xtl_log now accepts NULL, it should be fine. Thanks! > > Reviewed-by: Marek

[Xen-devel] [xen-4.11-testing test] 130812: tolerable FAIL - PUSHED

2018-11-28 Thread osstest service owner
flight 130812 xen-4.11-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/130812/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-xtf-amd64-amd64-3 69 xtf/test-hvm64-xsa-278 fail blocked in 129720

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

2018-11-28 Thread Hans van Kranenburg
On 11/28/18 2:55 PM, Juergen Gross wrote: > 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

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

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

Re: [Xen-devel] [RFC 06/16] gic: drop interrupts enabling on interrupts processing

2018-11-28 Thread Julien Grall
On 28/11/2018 21:32, Andrii Anisov wrote: > From: Andrii Anisov > > This reduces the number of context switches in case we have an > interrupt storm. We will read out all of those interrupt in the > loop anyway. This needs a better explanation. You might want to have a look at the details I

Re: [Xen-devel] [RFC 03/16] vgic: move pause_flags check out of vgic spinlock

2018-11-28 Thread Julien Grall
On 28/11/2018 21:31, Andrii Anisov wrote: > From: Andrii Anisov > > Pause_flags is not related to vgic spinlock, so reduce code > under lock. Well technically this code is plain wrong... If you receive an interrupt routed to a vCPU down, then you will end up losing the interrupt forever. So

Re: [Xen-devel] [PATCH V10 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-11-28 Thread Razvan Cojocaru
On 11/28/18 11:56 PM, Razvan Cojocaru wrote: > 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

Re: [Xen-devel] [RFC 01/16] xen/arm: Re-enable interrupt later in the trap path

2018-11-28 Thread Julien Grall
On 28/11/2018 21:31, Andrii Anisov wrote: > From: Julien Grall > > This makes function enter_hypervisor_head() being executed with > irqs locked. This also give a fine side effect - it assures that > LRs are cleared prior to any IRQs processing, which leads to a > better (faster) IRQs

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

2018-11-28 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

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

2018-11-28 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 allocates a new logdirty rangeset for each new altp2m, and propagates (under lock) changes to all p2ms. [PATCH V10 1/5] x86/p2m:

[Xen-devel] [PATCH V10 2/5] x86/p2m: refactor p2m_reset_altp2m()

2018-11-28 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. The previous code now replaced by p2m_reset_altp2m(d, i, ALTP2M_DEACTIVATE) calls did not set p2m->min_remapped_gfn and p2m->max_remapped_gfn because in those cases the altp2m

[Xen-devel] [PATCH V10 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-11-28 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

[Xen-devel] [PATCH V10 1/5] x86/p2m: allocate logdirty_ranges for altp2ms

2018-11-28 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.

[Xen-devel] [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets

2018-11-28 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

[Xen-devel] [RFC 08/16] gic: separate ppi processing

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov PPI are pcpu private, so their processing is not concurrent and do not need pcpu shared flags and correspondent lockings. So avoid odd bits sets, checks and locks. Signed-off-by: Andrii Anisov --- xen/arch/arm/gic.c| 8 ++-- xen/arch/arm/irq.c| 32

[Xen-devel] [RFC 13/16] gic-vgic: skip irqs locking

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov Those fucntions are called under IRQs disabled already, so avoid additional flags saving and restore. Signed-off-by: Andrii Anisov --- xen/arch/arm/gic-vgic.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/gic-vgic.c

[Xen-devel] [RFC 12/16] gic-v2: Write HCR only on change

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov This saves one write to peripheral HCR register per hypervisor entry for most cases. Signed-off-by: Andrii Anisov --- xen/arch/arm/gic-v2.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index

Re: [Xen-devel] [ARM] gvirt_to_maddr fails when DomU is created

2018-11-28 Thread Julien Grall
On 11/28/18 6:10 PM, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, On Tue, 27 Nov 2018 at 21:40, Julien Grall wrote: After creating domU, I'm seeing lots of this messages from hypervisor: (XEN) p2m.c:1442: d1v0: gvirt_to_maddr failed va=0x8efc7f0f flags=0x1 par=0x809 (XEN)

[Xen-devel] [RFC 03/16] vgic: move pause_flags check out of vgic spinlock

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov Pause_flags is not related to vgic spinlock, so reduce code under lock. Signed-off-by: Andrii Anisov --- xen/arch/arm/vgic.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index a2419d0..a64633f

[Xen-devel] [RFC 07/16] gic-vgic:vgic: do not keep disabled IRQs in any of queues

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov Do not put already disabled IRQs into any of queues, and remove an IRQ from all queues on disable. Insert the IRQ into queues on enable if needed. This also allows simplification of under-lock decission of events needed delivery. Signed-off-by: Andrii Anisov ---

[Xen-devel] [RFC 10/16] gic:vgic:gic-vgic: introduce non-atomic bitops

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov All bit operations for gic, vgic and gic-vgic are performed under spinlocks, so there is no need for atomic bit ops here, they only introduce excessive call to functions used more expensive exclusive ARM instructions. Signed-off-by: Andrii Anisov ---

[Xen-devel] [RFC 14/16] hack: arm/domain: simplify context restore from idle vcpu

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov Simplify context restore from idle vcpu to the one ran before it. This improves low cpu load but high irq rate use-cases. Signed-off-by: Andrii Anisov --- xen/arch/arm/domain.c | 21 +++-- xen/include/xen/sched.h | 1 + 2 files changed, 12 insertions(+),

[Xen-devel] [RFC 01/16] xen/arm: Re-enable interrupt later in the trap path

2018-11-28 Thread Andrii Anisov
From: Julien Grall This makes function enter_hypervisor_head() being executed with irqs locked. This also give a fine side effect - it assures that LRs are cleared prior to any IRQs processing, which leads to a better (faster) IRQs processing. Signed-off-by: Julien Grall [Andrii: add a

[Xen-devel] [RFC 02/16] hack: drop GIC v3 support

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov This reduces some code and conditions in an IRQ processing path, and opens way to further code reduction. Also insert compilation errors into gicv3 code, because it would not compile or work with following patches. Signed-off-by: Andrii Anisov ---

[Xen-devel] [RFC 05/16] gic-vgic: Drop an excessive clear_lrs

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov This action is excessive because for an invalid LR there is no need to write another invalid value to a register. So we can skip it here, saving a peripheral register access. Signed-off-by: Andrii Anisov --- xen/arch/arm/gic-vgic.c | 1 - 1 file changed, 1 deletion(-)

[Xen-devel] [RFC 09/16] gic-vgic:vgic: avoid excessive conversions

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov Avoid excessive conversions between pending_irq and irq number/priority. This simlifies functions interface and reduces under locks code size. Signed-off-by: Andrii Anisov --- xen/arch/arm/gic-vgic.c| 10 +++--- xen/arch/arm/vgic-v3-its.c | 2 +-

[Xen-devel] [RFC 11/16] irq: skip action avalability check for guest's IRQ

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov An IRQ assigned to guest always has an action. This removes another odd check on guest IRQ path. Also getting an unknown interrupt is very unlikely on a non-debug platform. Signed-off-by: Andrii Anisov --- xen/arch/arm/irq.c | 14 +++--- 1 file changed, 7

[Xen-devel] [RFC 04/16] vgic: move irq_to_pending out of lock

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov For GICV2 pending_irq allocation is not concurrent, so reduce some code under lock. Signed-off-by: Andrii Anisov --- xen/arch/arm/vgic.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index

[Xen-devel] [RFC 06/16] gic: drop interrupts enabling on interrupts processing

2018-11-28 Thread Andrii Anisov
From: Andrii Anisov This reduces the number of context switches in case we have an interrupt storm. We will read out all of those interrupt in the loop anyway. Signed-off-by: Andrii Anisov --- xen/arch/arm/gic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/arm/gic.c

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Russell King - ARM Linux
On Wed, Nov 28, 2018 at 11:27:17AM -0800, David Miller wrote: > From: Linus Torvalds > Date: Wed, 28 Nov 2018 10:00:06 -0800 > > > Not all memory is accessible even to the kernel. If you have memory > > that shows up in the last page of phys_addr_t, you just mark it > > reserved at boot-time. >

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

2018-11-28 Thread Razvan Cojocaru
On 11/26/18 2:08 PM, Jan Beulich wrote: On 22.11.18 at 12:40, wrote: >> @@ -956,18 +1003,14 @@ int p2m_change_type_one(struct domain *d, unsigned >> long gfn_l, >> } >> >> /* Modify the p2m type of a range of gfns from ot to nt. */ >> -void p2m_change_type_range(struct domain *d, >> -

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Russell King - ARM Linux
On Wed, Nov 28, 2018 at 11:19:15AM -0800, Linus Torvalds wrote: > On Wed, Nov 28, 2018, 10:08 Russell King - ARM Linux wrote: > > > > > > > You already cannot do that kmalloc(), exactly because of ERR_PTR(). > > > > I'm very sorry, but I think you are confused. > > > > kmalloc() returns a

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread David Miller
From: Linus Torvalds Date: Wed, 28 Nov 2018 10:00:06 -0800 > Not all memory is accessible even to the kernel. If you have memory > that shows up in the last page of phys_addr_t, you just mark it > reserved at boot-time. It's not the physical memory at the end that needs to be reserved. It's

Re: [Xen-devel] [PATCH RFC 5/6] xen-access: add support for slotted channel vm_events

2018-11-28 Thread Razvan Cojocaru
On 11/28/18 5:29 PM, Petre Pircalabu wrote: > Signed-off-by: Petre Pircalabu > --- > tools/tests/xen-access/xen-access.c | 510 > > 1 file changed, 408 insertions(+), 102 deletions(-) > > diff --git a/tools/tests/xen-access/xen-access.c >

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Russell King - ARM Linux
On Wed, Nov 28, 2018 at 06:08:41PM +, Russell King - ARM Linux wrote: > On Wed, Nov 28, 2018 at 10:00:06AM -0800, Linus Torvalds wrote: > > On Wed, Nov 28, 2018 at 9:45 AM Russell King - ARM Linux > > wrote: > > > > > > > I don't think this is a huge deal, but ERR_PTR() has been hugely > > >

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

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

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Linus Torvalds
On Wed, Nov 28, 2018, 10:08 Russell King - ARM Linux > > > You already cannot do that kmalloc(), exactly because of ERR_PTR(). > > I'm very sorry, but I think you are confused. > > kmalloc() returns a _virtual_ address, which quite rightly must not be > in the top 4K of 4GB, exactly due to

Re: [Xen-devel] [PATCH 9/9] libxl: Kill QEMU with "reaper" ruid

2018-11-28 Thread George Dunlap
> On Nov 28, 2018, at 5:02 PM, Ian Jackson wrote: > > George Dunlap writes ("[PATCH 9/9] libxl: Kill QEMU with "reaper" ruid"): >> Using kill(-1) to killing an untrusted dm process with the real uid >> equal to the dm_uid isn't guaranteed to succeed: the process in >> question may be able to

Re: [Xen-devel] [ARM] gvirt_to_maddr fails when DomU is created

2018-11-28 Thread Volodymyr Babchuk
Hi Julien, On Tue, 27 Nov 2018 at 21:40, Julien Grall wrote: > > After creating domU, I'm seeing lots of this messages from hypervisor: > > > > (XEN) p2m.c:1442: d1v0: gvirt_to_maddr failed va=0x8efc7f0f > > flags=0x1 par=0x809 > > (XEN) p2m.c:1442: d1v0: gvirt_to_maddr failed

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Russell King - ARM Linux
On Wed, Nov 28, 2018 at 10:00:06AM -0800, Linus Torvalds wrote: > On Wed, Nov 28, 2018 at 9:45 AM Russell King - ARM Linux > wrote: > > > > > I don't think this is a huge deal, but ERR_PTR() has been hugely > > > successful elsewhere. And I'm not hugely convinced about all these > > > "any

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Linus Torvalds
On Wed, Nov 28, 2018 at 9:45 AM Russell King - ARM Linux wrote: > > > I don't think this is a huge deal, but ERR_PTR() has been hugely > > successful elsewhere. And I'm not hugely convinced about all these > > "any address can be valid" arguments. How the hell do you generate a > > random dma

Re: [Xen-devel] [PATCH 8/9] libxl: Kill QEMU by uid when possible

2018-11-28 Thread George Dunlap
> On Nov 28, 2018, at 4:56 PM, Ian Jackson wrote: > > George Dunlap writes ("[PATCH 8/9] libxl: Kill QEMU by uid when possible"): >> The privcmd fd that a dm_restrict'ed QEMU has gives it permission to >> one specific domain ID. This domain ID will probably eventually be >> used again. It is

Re: [Xen-devel] [PATCH for-3.2 v4 15/28] hw: apply accel compat properties without touching globals

2018-11-28 Thread Igor Mammedov
On Tue, 27 Nov 2018 13:27:48 +0400 Marc-André Lureau wrote: > Introduce object_apply_global_props() function, to apply compatibility > properties from a GPtrArray. > > For accel compatibility properties, apply them during > device_post_init(), after accel_register_compat_props() has set them. >

Re: [Xen-devel] vpci: deferral of register write until p2m changes are done

2018-11-28 Thread Roger Pau Monné
On Wed, Nov 28, 2018 at 10:04:33AM -0700, Jan Beulich wrote: > >>> On 28.11.18 at 17:54, wrote: > > On Wed, Nov 28, 2018 at 09:22:16AM -0700, Jan Beulich wrote: > >> >>> On 28.11.18 at 16:41, wrote: > >> > My plan is that DomUs won't be allowed to toggle the memory decoding > >> > bit, and it's

Re: [Xen-devel] [PATCH] tools/firmware: update OVMF Makefile

2018-11-28 Thread Wei Liu
On Wed, Nov 28, 2018 at 05:43:33PM +, Wei Liu wrote: > OVMF has become dependent on OpenSSL, which it is included as a submodule. s/it// ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] Problems building and running Xen on Hikey960

2018-11-28 Thread Julien Grall
Hi, On 28/11/2018 15:46, Stefano Stabellini wrote: On Wed, 28 Nov 2018, Julien Grall wrote: Hi Matthew, On 28/11/2018 06:43, Matthew Daley wrote: On Mon, 26 Nov 2018 at 14:07, Matthew Daley wrote: On Fri, 23 Nov 2018 at 09:51, Julien Grall wrote: Hi Matthew, Sorry for the late answer

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Russell King - ARM Linux
On Wed, Nov 28, 2018 at 08:47:05AM -0800, Linus Torvalds wrote: > On Tue, Nov 27, 2018 at 11:41 PM Christoph Hellwig wrote: > > > > On Fri, Nov 23, 2018 at 07:55:11AM +0100, Christoph Hellwig wrote: > > > Well, I can tweak the last patch to return -EINVAL from dma_mapping_error > > > instead of

[Xen-devel] [PATCH] tools/firmware: update OVMF Makefile

2018-11-28 Thread Wei Liu
OVMF has become dependent on OpenSSL, which it is included as a submodule. Initialise submodules before building. Signed-off-by: Wei Liu --- This should fix the build breakage for OVMF branch in OSSTEST. Cc: Anthony PERARD Cc: Ian Jackson --- tools/firmware/ovmf-makefile | 1 + 1 file

Re: [Xen-devel] [PATCH 5/9] libxl: Do root checks once in libxl__domain_get_device_model_uid

2018-11-28 Thread George Dunlap
> On Nov 28, 2018, at 4:39 PM, Ian Jackson wrote: > > George Dunlap writes ("[PATCH 5/9] libxl: Do root checks once in > libxl__domain_get_device_model_uid"): >> At the moment, we check for equivalence to literal "root" before >> deciding whether to add the `runas` command-line option to

Re: [Xen-devel] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Anthony PERARD
On Wed, Nov 28, 2018 at 05:17:10PM +, Paul Durrant wrote: > > Will we need a hotplug handler for this bus, like it is done with > > TYPE_XENSYSBUS? > > I didn't seem to need one even doing 'xl block-attach' after the VM had > booted. I'm really not sure what that does. Indeed, that works

Re: [Xen-devel] [PATCH 4/9] dm_depriv: Describe expected usage of device_model_user parameter

2018-11-28 Thread George Dunlap
> On Nov 28, 2018, at 4:36 PM, Ian Jackson wrote: > > George Dunlap writes ("[PATCH 4/9] dm_depriv: Describe expected usage of > device_model_user parameter"): >> A number of subsequent patches rely on as-yet undefined behavior for >> what the `device_model_user` parameter does. Rather than

Re: [Xen-devel] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 28 November 2018 17:10 > To: Paul Durrant > Cc: qemu-bl...@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini ; > Michael S. Tsirkin ; Marcel Apfelbaum > ; Paolo

Re: [Xen-devel] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:11:55PM +, Paul Durrant wrote: > diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c > new file mode 100644 > index 00..dede2d914a > --- /dev/null > +++ b/hw/xen/xen-bus.c > @@ -0,0 +1,125 @@ > +/* > + * Copyright (c) Citrix Systems Inc. > + * All rights

Re: [Xen-devel] [Qemu-devel] [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Paul Durrant
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: 28 November 2018 17:01 > To: Paul Durrant ; 'Kevin Wolf' > > Cc: Stefano Stabellini ; Eduardo Habkost > ; qemu-bl...@nongnu.org; Michael S. Tsirkin > ; qemu-de...@nongnu.org; Paolo Bonzini > ; Anthony Perard ; xen-

Re: [Xen-devel] vpci: deferral of register write until p2m changes are done

2018-11-28 Thread Jan Beulich
>>> On 28.11.18 at 17:54, wrote: > On Wed, Nov 28, 2018 at 09:22:16AM -0700, Jan Beulich wrote: >> >>> On 28.11.18 at 16:41, wrote: >> > My plan is that DomUs won't be allowed to toggle the memory decoding >> > bit, and it's going to be always enabled, like it's currently done for >> >

Re: [Xen-devel] [PATCH 3/9] libxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)

2018-11-28 Thread George Dunlap
> On Nov 28, 2018, at 4:34 PM, Ian Jackson wrote: > > George Dunlap writes ("[PATCH 3/9] libxl: Get rid of support for > QEMU_USER_BASE (xen-qemuuser-domidNN)"): >> QEMU_USER_BASE allows a user to specify the UID to use when running >> the devicemodel for a specific domain number.

Re: [Xen-devel] [PATCH 9/9] libxl: Kill QEMU with "reaper" ruid

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 9/9] libxl: Kill QEMU with "reaper" ruid"): > Using kill(-1) to killing an untrusted dm process with the real uid > equal to the dm_uid isn't guaranteed to succeed: the process in > question may be able to kill the reaper process after the setresuid() > and before the

Re: [Xen-devel] [Qemu-devel] [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Eric Blake
On 11/28/18 10:26 AM, Paul Durrant wrote: +++ b/hw/xen/xen-bus.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) Citrix Systems Inc. + * All rights reserved. + */ This doesn't look very compatible with the GPL. In fact it might even make it illegal for the QEMU project to distribute this code. :-)

Re: [Xen-devel] [PATCH 8/9] libxl: Kill QEMU by uid when possible

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 8/9] libxl: Kill QEMU by uid when possible"): > The privcmd fd that a dm_restrict'ed QEMU has gives it permission to > one specific domain ID. This domain ID will probably eventually be > used again. It is therefore necessary to make absolutely sure that a > rogue

Re: [Xen-devel] vpci: deferral of register write until p2m changes are done

2018-11-28 Thread Roger Pau Monné
On Wed, Nov 28, 2018 at 09:22:16AM -0700, Jan Beulich wrote: > >>> On 28.11.18 at 16:41, wrote: > > On Wed, Nov 28, 2018 at 06:01:12AM -0700, Jan Beulich wrote: > >> >>> On 28.11.18 at 11:09, wrote: > >> > Hello, > >> > > >> > While doing the recent vPCI fixes and also working on SR-IOV support

[Xen-devel] [PATCH for-4.12 2/8] xen/arm: p2m: Provide an helper to generate the VTTBR

2018-11-28 Thread Julien Grall
A follow-up patch will need to generate the VTTBR in a few places. Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 6c76298ebc..8ebf1e8dba 100644 --- a/xen/arch/arm/p2m.c

[Xen-devel] [PATCH for-4.12 0/8] xen/arm: Workaround for Cortex-A76 erratum 1165522

2018-11-28 Thread Julien Grall
Hi all, Early version of Cortex-A76 can end-up with corrupt TLBs if they speculate an AT instruction while the S1/S2 system registers are in an inconsistent state. This can happen during guest context switch and when invalidating the TLBs for other than the current VMID. The workaround

[Xen-devel] [PATCH for-4.12 6/8] xen/arm: Implement workaround for Cortex-A76 erratum 1165522

2018-11-28 Thread Julien Grall
Early version of Cortex-A76 can end-up with corrupt TLBs if they speculate an AT instruction while the S1/S2 system registers are in an inconsistent state. This can happen during guest context switch and when invalidating the TLBs for other than the current VMID. The workaround implemented in

[Xen-devel] [PATCH for-4.12 5/8] xen/arm: p2m: Only use isb() when it is necessary

2018-11-28 Thread Julien Grall
The EL1 translation regime is out-of-context when running at EL2. This means the processor cannot speculate memory accesses using the registers associated to that regime. An isb() is only need if Xen is going to use the translation regime before returning to the guest (exception returns will

[Xen-devel] [PATCH for-4.12 8/8] DO NOT APPLY Allow testing the new AT speculate workaround code

2018-11-28 Thread Julien Grall
Signed-off-by: Julien Grall --- xen/arch/arm/cpuerrata.c | 10 ++ xen/arch/arm/p2m.c | 2 ++ 2 files changed, 12 insertions(+) diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 61c64b9816..e7278f2899 100644 --- a/xen/arch/arm/cpuerrata.c +++

[Xen-devel] [PATCH for-4.12 1/8] xen/arm: Only set necessary flags when initializing HCR_EL2

2018-11-28 Thread Julien Grall
Only {A,F,I}MO are necessary to receive interrupts until a guest vCPU is loaded. The rest have no effect on Xen and it is better to avoid setting them. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

[Xen-devel] [PATCH for-4.12 3/8] xen/arm: p2m: Introduce an helper to allocate the root page-table

2018-11-28 Thread Julien Grall
A follow-up patch will require to allocate the root page-table without having a domain in hand. Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index

[Xen-devel] [PATCH for-4.12 4/8] xen/arm: domain_build: Don't switch to the guest P2M when copying data

2018-11-28 Thread Julien Grall
Until recently, kernel/initrd/dtb were loaded using guest VA and therefore requiring to restore temporarily the P2M. This reworked in a series of commits (up to 9292086 "xen/arm: domain_build: Use copy_to_guest_phys_flush_dcache in dtb_load") to use a guest PA. This will also help a follow-up

[Xen-devel] [PATCH for-4.12 7/8] xen/arm: p2m: Clean-up headers included and order them alphabetically

2018-11-28 Thread Julien Grall
A lot of the headers are not necessary, so remove them. At the same time, re-order them alphabetically. Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index

Re: [Xen-devel] [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Paul Durrant
> -Original Message- > From: Paul Durrant > Sent: 28 November 2018 16:46 > To: 'Kevin Wolf' > Cc: 'Stefano Stabellini' ; qemu-bl...@nongnu.org; > qemu-de...@nongnu.org; xen-devel@lists.xenproject.org; Eduardo Habkost > ; Michael S. Tsirkin ; Marcel > Apfelbaum ; Anthony Perard > ; Paolo

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Linus Torvalds
On Tue, Nov 27, 2018 at 11:41 PM Christoph Hellwig wrote: > > On Fri, Nov 23, 2018 at 07:55:11AM +0100, Christoph Hellwig wrote: > > Well, I can tweak the last patch to return -EINVAL from dma_mapping_error > > instead of the old 1 is as bool true. The callers should all be fine, > > although

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

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

[Xen-devel] Xen stable-4.11 crash when trying to start a VM on fedora 29

2018-11-28 Thread Mathieu Tarral
Hi, I managed to compile and install Xen from source,using the  stable-4.11 branch. I configured my VMs in libvirt, but when I try to start one of them, the host completely crashes after a few seconds (the VM is never started), and reboots. I ran dmesg -w before starting the VM, and the ouput

Re: [Xen-devel] [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Paul Durrant
> -Original Message- > From: Kevin Wolf [mailto:kw...@redhat.com] > Sent: 28 November 2018 16:39 > To: Paul Durrant > Cc: 'Stefano Stabellini' ; qemu-bl...@nongnu.org; > qemu-de...@nongnu.org; xen-devel@lists.xenproject.org; Eduardo Habkost > ; Michael S. Tsirkin ; Marcel > Apfelbaum ;

Re: [Xen-devel] Patch "x86/entry/64: Remove %ebx handling from error_entry/exit" has been added to the 4.9-stable tree

2018-11-28 Thread Andy Lutomirski
> On Nov 28, 2018, at 6:56 AM, David Woodhouse wrote: > >> On Wed, 2018-08-22 at 09:19 +0200, gre...@linuxfoundation.org wrote: >> This is a note to let you know that I've just added the patch titled >> >>x86/entry/64: Remove %ebx handling from error_entry/exit >> >> to the 4.9-stable

Re: [Xen-devel] [PATCH 7/9] libxl: Make killing of device model asynchronous

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 7/9] libxl: Make killing of device model asynchronous"): > Or at least, give it an asynchronous interface so that we can make it > actually asynchronous in subsequent patches. > > Create state structures and callback function signatures. Add the > state structure

Re: [Xen-devel] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-11-28 Thread Paul Durrant
> -Original Message- > From: Kevin Wolf [mailto:kw...@redhat.com] > Sent: 28 November 2018 16:35 > To: Paul Durrant > Cc: qemu-bl...@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini ; > Anthony Perard ; Max Reitz > Subject: Re: [PATCH 14/18] xen:

Re: [Xen-devel] [PATCH 6/9] libxl: Move qmp cleanup into devicemodel destroy function

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 6/9] libxl: Move qmp cleanup into devicemodel destroy function"): > Removing the qmp connection is logically part of the device model > destruction; having the caller destroy it is a mild layering > violation. > > Move libxl__qmp_cleanup() into

Re: [Xen-devel] [PATCH 5/9] libxl: Do root checks once in libxl__domain_get_device_model_uid

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 5/9] libxl: Do root checks once in libxl__domain_get_device_model_uid"): > At the moment, we check for equivalence to literal "root" before > deciding whether to add the `runas` command-line option to QEMU. This > is unsatisfactory for several reasons. I was in two

Re: [Xen-devel] [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Kevin Wolf
Am 28.11.2018 um 17:29 hat Paul Durrant geschrieben: > > -Original Message- > > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > > Sent: 28 November 2018 16:28 > > To: Paul Durrant > > Cc: 'Kevin Wolf' ; qemu-bl...@nongnu.org; qemu- > > de...@nongnu.org;

Re: [Xen-devel] [PATCH 4/9] dm_depriv: Describe expected usage of device_model_user parameter

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 4/9] dm_depriv: Describe expected usage of device_model_user parameter"): > A number of subsequent patches rely on as-yet undefined behavior for > what the `device_model_user` parameter does. Rather than implement it > incorrectly (or randomly), or remove the

Re: [Xen-devel] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-11-28 Thread Kevin Wolf
Am 21.11.2018 um 16:12 hat Paul Durrant geschrieben: > ...and wire in the dataplane. > > This patch adds the remaining code to make the xen-qdisk XenDevice > functional. The parameters that a block frontend expects to find are > populated in the backend xenstore area, and the 'ring-ref' and >

Re: [Xen-devel] [PATCH 3/9] libxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)

2018-11-28 Thread Ian Jackson
George Dunlap writes ("[PATCH 3/9] libxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)"): > QEMU_USER_BASE allows a user to specify the UID to use when running > the devicemodel for a specific domain number. Unfortunately, this is > not really practical: It requires nearly 32,000

  1   2   3   >