Re: [Xen-devel] [PATCH] xen/scsifront: don't advance ring request pointer in case of error

2016-11-29 Thread David Vrabel
On 29/11/16 11:19, Juergen Gross wrote: > On 29/11/16 12:14, Jan Beulich wrote: > On 29.11.16 at 11:50, wrote: >>> --- a/drivers/scsi/xen-scsifront.c >>> +++ b/drivers/scsi/xen-scsifront.c >>> @@ -184,8 +184,6 @@ static struct vscsiif_request *scsifront_pre_req(struct >>> vscsifrnt_info *info

Re: [Xen-devel] [PATCH] xen/gntdev: Use mempolicy instead of VM_IO flag to avoid NUMA balancing

2016-11-16 Thread David Vrabel
t; > To avoid this, instead of setting VM_IO use mempolicy that prohibits page > migration (i.e. clear policy's MPOL_F_MOF|MPOL_F_MORON) Reviewed-by: David Vrabel With the corrected commit message. David

Re: [Xen-devel] [PATCH RESEND] xen/gntdev: Grant maps should not be subject to NUMA balancing

2016-11-10 Thread David Vrabel
On 10/11/16 17:47, Olaf Hering wrote: > On Thu, Nov 10, Boris Ostrovsky wrote: > >> Are you sure it's this patch that causes the failure? >> >> I commented out '| VM_IO' and still unable to boot with this option. > > Yes, this works for me, sles12sp2 dom0+domU, which is linux-4.4 based: > > +++

Re: [PATCH 00/12] xen: add common function for reading optional value

2016-11-07 Thread David Vrabel
ith the call of the new function > where appropriate. Acked-by: David Vrabel Please queue for the next release. David

Re: [Xen-devel] [PATCH 01/12] xen: introduce xenbus_read_unsigned()

2016-11-07 Thread David Vrabel
On 31/10/16 16:48, Juergen Gross wrote: > There are multiple instances of code reading an optional unsigned > parameter from Xenstore via xenbus_scanf(). Instead of repeating the > same code over and over add a service function doing the job. Reviewed-by: David Vrabel David

[PATCHv4 2/3] xenfs: replace xenbus and privcmd with symlinks

2016-10-28 Thread David Vrabel
identical to the character device /dev/xen/xenbus so replace the file with a symlink. Similarly, replace /proc/xen/privcmd with a symlink since it should be the same as /dev/xen/privcmd. Signed-off-by: David Vrabel --- v4: - Make xen_xenbus_fops and xen_privcmd_fops static. --- drivers/xen/privcmd.c

[PATCHv4 3/3] xenfs: Use proc_create_mount_point() to create /proc/xen

2016-10-28 Thread David Vrabel
al. Export this interface to modules, then use it in xenbus when creating /proc/xen. Signed-off-by: Seth Forshee Signed-off-by: David Vrabel --- drivers/xen/xenbus/xenbus_probe.c | 2 +- fs/proc/generic.c | 1 + fs/proc/internal.h| 1 - include/linux/proc_fs.h

[PATCH v4 0/3] libfs,xenfs: replace /proc/xen/xenbus with a symlink

2016-10-28 Thread David Vrabel
Using /proc/xen/xenbus can cause deadlocks on the atomic file position mutex since this file should behave like a character device and not a regular file. This is easiest to achive by making it a symlink to the existing /dev/xen/xenbus device. This requires extending simple_fill_super() to add sy

[PATCHv4 1/3] libfs: allow simple_fill_super() to add symlinks

2016-10-28 Thread David Vrabel
simple_fill_super() will add symlinks if an entry has mode & S_IFLNK. The target is provided in the new "link" field. Signed-off-by: David Vrabel --- v4: - Use switch for file type. v2: - simplified. --- fs/libfs.c | 27 --- include/linux/fs.h |

[GIT PULL] xen: xenfs fixes for 4.9-rc2

2016-10-24 Thread David Vrabel
++ 11 files changed, 24 insertions(+), 22 deletions(-) David Vrabel (2): libfs: allow simple_fill_super() to add symlinks xenfs: replace xenbus and privcmd with symlinks Seth Forshee (1): xenbus: Use proc_create_mount_point() to create /proc/xen -BEGIN PGP SIGNATURE

[GIT PULL] xen: fixes for 4.9-rc2

2016-10-24 Thread David Vrabel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.9-rc2-tag xen: fixes for 4.9-rc2 - - Advertise control feature flags in xenstore. - - Fix x86 build when XEN_PVHVM is disabled. Than

Re: [PATCH v3] xenbus: advertize control feature flags

2016-10-11 Thread David Vrabel
ant feature-flag keys. >> >> Signed-off-by: Paul Durrant >> Cc: Boris Ostrovsky >> Cc: David Vrabel >> Cc: Juergen Gross > > Hmm, I'd prefer node[] allocated on the stack over dynamic allocation. > > What about something like the following? It will at

Re: [PATCH v2] xenbus: advertize control feature flags

2016-10-10 Thread David Vrabel
On 10/10/16 10:43, Paul Durrant wrote: > The Xen docs specify several flags which a guest can set to advertize > which values of the xenstore control/shutdown key it will recognize. > This patch adds code to write all the relevant feature-flag keys. [...] > static int setup_shutdown_watcher(void)

Re: [Xen-devel] [PATCH] xen/x86: Update topology map for PV VCPUs

2016-10-06 Thread David Vrabel
On 05/10/16 18:09, Boris Ostrovsky wrote: > Early during boot topology_update_package_map() computes > logical_pkg_ids for all present processors. > > Later, when processors are brought up, identify_cpu() updates > these values based on phys_pkg_id which is a function of > initial_apicid. On PV gu

[GIT PULL] xen: features and fixes for 4.9-rc0

2016-10-06 Thread David Vrabel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.9-rc0-tag xen: features and fixes for 4.9-rc0 - - Switch to new CPU hotplug mechanism. - - Support driver_override in pciback. - - Re

Re: [Xen-devel] [PATCH] xen/x86: Initialize per_cpu(xen_vcpu, 0) a little earlier

2016-10-05 Thread David Vrabel
On 02/10/16 23:45, Boris Ostrovsky wrote: > xen_cpuhp_setup() calls mutex_lock() which, when CONFIG_DEBUG_MUTEXES > is defined, ends up calling xen_save_fl(). That routine expects > per_cpu(xen_vcpu, 0) to be already initialized. Applied to for-linus-4.9, thanks. David

Re: [Xen-devel] [PATCH v3 0/3] xen/pciback: support driver_override

2016-09-30 Thread David Vrabel
On 22/09/16 09:45, Juergen Gross wrote: > Support the driver_override scheme introduced with commit 782a985d7af2 > ("PCI: Introduce new device binding path using pci_dev.driver_override") Applied to for-linus-4.9, thanks. David

Re: [Xen-devel] [PATCH v2 0/2] Convert to new CPU hotplug framework

2016-09-30 Thread David Vrabel
On 07/09/16 18:18, Boris Ostrovsky wrote: > New CPU hotplug framework was introduced recently. These patches convert Xen > CPU hotplug code to this infrastructure. Applied to for-linus-4.9, thanks. David

Re: [Xen-devel] [PATCH] xen: Remove event channel notification through Xen PCI platform device

2016-09-30 Thread David Vrabel
On 26/08/16 22:55, KarimAllah Ahmed wrote: > Ever since commit 254d1a3f02eb ("xen/pv-on-hvm kexec: shutdown watches > from old kernel") using the INTx interrupt from Xen PCI platform device for > event channel notification would just lockup the guest during bootup. > postcore_initcall now calls xs_

Re: [Xen-devel] [PATCH v3 2/3] xen/pciback: avoid multiple entries in slot list

2016-09-23 Thread David Vrabel
On 22/09/16 22:02, Boris Ostrovsky wrote: > On 09/22/2016 04:45 AM, Juergen Gross wrote: >> The Xen pciback driver has a list of all pci devices it is ready to >> seize. There is no check whether a to be added entry already exists. >> While this might be no problem in the common case it might confu

Re: [PATCH net-next RESEND] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-19 Thread David Vrabel
On 19/09/16 11:22, Vitaly Kuznetsov wrote: > David Miller writes: > >> From: Vitaly Kuznetsov >> Date: Fri, 16 Sep 2016 12:59:14 +0200 >> >>> @@ -595,6 +596,19 @@ static int xennet_start_xmit(struct sk_buff *skb, >>> struct net_device *dev) >>> offset = offset_in_page(skb->data); >>> le

Re: [PATCH v2 2/3] x86 Test and expose CPUID faulting capabilities in /proc/cpuinfo

2016-09-15 Thread David Vrabel
On 14/09/16 22:35, Dave Hansen wrote: > On 09/14/2016 02:01 PM, Kyle Huey wrote: >> Xen advertises the underlying support for CPUID faulting but not does pass >> through writes to the relevant MSR, nor does it virtualize it, so it does >> not actually work. For now mask off the relevant bit on MSR_

Re: [Xen-devel] [PATCH v2 2/3] x86 Test and expose CPUID faulting capabilities in /proc/cpuinfo

2016-09-15 Thread David Vrabel
break; > + case MSR_PLATFORM_INFO: > + val &= ~CPUID_FAULTING_SUPPORT; > + break; > } > return val; > } Acked-by: David Vrabel David

[GIT PULL] xen: regression fix for 4.8-rc6

2016-09-14 Thread David Vrabel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.8b-rc6-tag xen: regression fix for 4.8-rc6 - - Fix SMP boot in arm guests. Thanks. David arch/arm/xen/enlighten.c | 7 +++ 1

Re: [Xen-devel] [PATCH v2] xen/pciback: support driver_override

2016-09-09 Thread David Vrabel
On 09/09/16 07:14, Juergen Gross wrote: > On 08/09/16 16:10, Boris Ostrovsky wrote: >> On 09/02/2016 08:30 AM, Juergen Gross wrote: >>> Support the driver_override scheme introduced with commit 782a985d7af2 >>> ("PCI: Introduce new device binding path using pci_dev.driver_override") >>> >>> As pcis

Re: [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-09 Thread David Vrabel
at's what > this patch is trying to achieve with skb_copy(). > > Signed-off-by: Vitaly Kuznetsov We should probably fix the backend to handle this (by grant copying a minimum amount in the linear area, but since netfront needs to work with older netback. Acked-by: David Vrabel David

Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping

2016-09-07 Thread David Vrabel
pu xen_vcpu_id mapping. ARM and PV guests get direct >>>>>>> mapping >>>>>>> for now. Boot CPU for PVHVM guest gets its id from CPUID. With secondary >>>>>>> CPUs it is a bit more trickier. Currently, we initialize IPI ve

Re: [Xen-devel] [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen

2016-08-30 Thread David Vrabel
On 30/08/16 16:10, Seth Forshee wrote: > On Tue, Aug 30, 2016 at 04:00:03PM +0100, David Vrabel wrote: >> On 29/08/16 16:03, Seth Forshee wrote: >>> Mounting proc in user namespace containers fails if the xenbus >>> filesystem is mounted on /proc/xen because t

Re: [Xen-devel] [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen

2016-08-30 Thread David Vrabel
tpoints in proc but is currently > proc-internal. Export this interface to modules, then use it in > xenbus when creating /proc/xen. Acked-by: David Vrabel This either needs to be acked by the fs maintainer or go via their tree but you don't appear to have Cc'd the relevant people or lists. David

Re: [Xen-devel] [PATCH] xen/grant-table: Use kmalloc_array() in arch_gnttab_valloc()

2016-08-26 Thread David Vrabel
On 25/08/16 12:30, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 25 Aug 2016 13:23:06 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus reuse the corresponding function "kmalloc_ar

Re: [Xen-devel] [PATCH v2 0/2] Reinstate irq alloc/dealloc locking patch

2016-08-24 Thread David Vrabel
On 03/08/16 18:22, Boris Ostrovsky wrote: > Original version of that patch (commit a89941816726) had to be reverted > due to Xen allocating irqs in its cpu_up ops. > > The first patch moves allocations into hotplug notifiers and the second > one restores the original patch (with minor adjustments

Re: [Xen-devel] [PATCH v2] xen: rename xen_pmu_init() in sys-hypervisor.c

2016-08-24 Thread David Vrabel
On 02/08/16 07:53, Juergen Gross wrote: > There are two functions with name xen_pmu_init() in the kernel. Rename > the one in drivers/xen/sys-hypervisor.c to avoid shadowing the one in > arch/x86/xen/pmu.c > > To avoid the same problem in future rename some more functions. Applied to for-linus-4.

Re: [Xen-devel] [PATCH v3] xen: Make VPMU init message look less scary

2016-08-24 Thread David Vrabel
On 02/08/16 08:22, Juergen Gross wrote: > The default for the Xen hypervisor is to not enable VPMU in order to > avoid security issues. In this case the Linux kernel will issue the > message "Could not initialize VPMU for cpu 0, error -95" which looks > more like an error than a normal state. > >

Re: [Xen-devel] [PATCH linux v2] xen: change the type of xen_vcpu_id to uint32_t

2016-08-24 Thread David Vrabel
On 29/07/16 10:06, Vitaly Kuznetsov wrote: > We pass xen_vcpu_id mapping information to hypercalls which require > uint32_t type so it would be cleaner to have it as uint32_t. The > initializer to -1 can be dropped as we always do the mapping before using > it and we never check the 'not set' value

Re: [Xen-devel] [PATCH] xenbus: don't look up transaction IDs for ordinary writes

2016-08-24 Thread David Vrabel
On 15/08/16 16:02, Jan Beulich wrote: > This should really only be done for XS_TRANSACTION_END messages, or > else at least some of the xenstore-* tools don't work anymore. Applied to for-linus-4.8b, thanks. David

[GIT PULL] xen: regression fix for 4.8-rc3

2016-08-24 Thread David Vrabel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.8b-rc3-tag xen: regression fix for 4.8-rc3 - - Fix a regression in the xenbus device preventing userspace tools from working. Than

Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-08-22 Thread David Vrabel
On 22/08/16 16:42, Vitaly Kuznetsov wrote: > > I see two ways to fix the issue: > - Change the 'wire' protocol between netfront and netback to start keeping > the original SKB structure. We'll have to add a flag indicating the fact > that the particular request is a part of the original linear

Re: [Xen-devel] [PATCH 2/2] xen/events: Convert to hotplug state machine

2016-08-15 Thread David Vrabel
On 15/08/16 15:46, Boris Ostrovsky wrote: > From: Sebastian Andrzej Siewior > > Install the callbacks via the state machine. [...] > +static int xen_evtchn_cpu_dead(unsigned int cpu) > +{ > + __evtchn_fifo_handle_events(cpu, true); > + return 0; > +} I'm not familiar with the new state m

Re: [Xen-devel] [PATCH linux] xen: change the type of xen_vcpu_id to uint32_t

2016-07-28 Thread David Vrabel
On 28/07/16 17:24, Vitaly Kuznetsov wrote: > We pass xen_vcpu_id mapping information to hypercalls which require > uint32_t type so it would be cleaner to have it as uint32_t. The > initializer to -1 can be dropped as we always do the mapping before using > it and we never check the 'not set' value

Re: [Xen-devel] [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-28 Thread David Vrabel
On 27/07/16 04:21, Bob Liu wrote: > The current VBD layer reserves buffer space for each attached device based on > three statically configured settings which are read at boot time. > * max_indirect_segs: Maximum amount of segments. > * max_ring_page_order: Maximum order of pages to be used for t

[GIT PULL] xen: features and fixes for 4.8-rc0

2016-07-27 Thread David Vrabel
): xen/PMU: Log VPMU initialization error at lower level David Vrabel (1): xen/evtchn: add IOCTL_EVTCHN_RESTRICT Jan Beulich (11): xen-pciback: drop unused function parameter of read_dev_bar() xen-pciback: drop rom_init() xen-pciback: fold read_dev_bar() into its now

Re: [Xen-devel] [PATCH] xen: add static initialization of steal_clock op to xen_time_ops

2016-07-26 Thread David Vrabel
On 26/07/16 13:15, Juergen Gross wrote: > pv_time_ops might be overwritten with xen_time_ops after the > steal_clock operation has been initialized already. To prevent calling > a now uninitialized function pointer add the steal_clock static > initialization to xen_time_ops. Applied to for-linus-4

Re: [Xen-devel] [PATCH linux v3 0/9] xen: pvhvm: support bootup on secondary vCPUs

2016-07-26 Thread David Vrabel
On 26/07/16 13:30, Vitaly Kuznetsov wrote: > It may happen that Xen's and Linux's ideas of vCPU id diverge. In > particular, when we crash on a secondary vCPU we may want to do kdump > and unlike plain kexec where we do migrate_to_reboot_cpu() we try booting > on the vCPU which crashed. This doesn'

Re: [Xen-devel] [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs

2016-07-25 Thread David Vrabel
On 25/07/16 15:01, Julien Grall wrote: > Hello, > > On 25/07/16 14:39, Vitaly Kuznetsov wrote: >> Julien Grall writes: >> >>> Hi David, >>> >>> On 25/07/16 13:38, David Vrabel wrote: >>>> On 30/06/16 16:56, Vitaly Kuznetsov wrote:

Re: [Xen-devel] [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs

2016-07-25 Thread David Vrabel
On 25/07/16 14:17, Julien Grall wrote: > Hi David, > > On 25/07/16 13:38, David Vrabel wrote: >> On 30/06/16 16:56, Vitaly Kuznetsov wrote: >>> It may happen that Xen's and Linux's ideas of vCPU id diverge. In >>> particular, when we crash on a sec

Re: [Xen-devel] [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs

2016-07-25 Thread David Vrabel
On 30/06/16 16:56, Vitaly Kuznetsov wrote: > It may happen that Xen's and Linux's ideas of vCPU id diverge. In > particular, when we crash on a secondary vCPU we may want to do kdump > and unlike plain kexec where we do migrate_to_reboot_cpu() we try booting > on the vCPU which crashed. This doesn'

Re: [PATCH 4/4] x86: use pte_none() to test for empty PTE

2016-07-14 Thread David Vrabel
ause that PTE does not have _PAGE_PRESENT set. > > It does seem fragile that Xen is doing it this way, but I guess it works. Xen PV guests never plays games with non-present PTEs so, for the series, wrt Xen: Acked-by: David Vrabel FWIW, present PTEs have a hardware-specified meaning where-as non-present PTEs do not, so I'm not sure I'd view Xen PV guests making this distinct as "fragile". David

Re: [Xen-devel] [PATCH 2/2] Allow kdump with crash_kexec_post_notifiers

2016-07-13 Thread David Vrabel
being called later. Prioritising the in-kernel kexec image over the hypervisor one seems sensible behaviour to me. Reviewed-by: David Vrabel David

Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed

2016-07-11 Thread David Vrabel
On 11/07/16 10:33, Juergen Gross wrote: > On 11/07/16 04:51, Bin Wu wrote: >> During scsi command queueing, if mapping data fails, we need to >> reclaim the failed request. Otherwise, the garbage request will >> be pushed into the ring for the backend to work. > > Well spotted. There is another in

Re: [Xen-devel] [PATCHv3 1/2] libfs: allow simple_fill_super() to add symlinks

2016-07-11 Thread David Vrabel
On 28/06/16 19:06, David Vrabel wrote: > simple_fill_super() will add symlinks if an entry has mode & S_IFLNK. > The target is provided in the new "link" field. Can I get an ack for this, please? So it can go into 4.8 via the Xen tree. David > > Signed-off-by

Re: [Xen-devel] [PATCH v2 0/4] xen: prefer xenbus_scanf() over xenbus_gather()

2016-07-08 Thread David Vrabel
On 08/07/16 15:17, Konrad Rzeszutek Wilk wrote: > On Fri, Jul 08, 2016 at 06:21:52AM -0600, Jan Beulich wrote: >> For single items being collected this should be preferred as being more >> typesafe (as the compiler can check format string and to-be-written-to >> variable match) and more efficient (

[GIT PULL] xen: bug fixes for 4.7-rc6

2016-07-08 Thread David Vrabel
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.7b-rc6-tag xen: bug fixes for 4.7-rc6 - Fix two bugs in the handling of xenbus transactions. - Make the xen acpi driver compatible with Xen 4.7. Thanks. David drivers/xen/xen-ac

Re: [Xen-devel] [PATCH] xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7

2016-07-08 Thread David Vrabel
On 08/07/16 13:53, Jan Beulich wrote: On 08.07.16 at 14:29, wrote: >> On 08/07/16 13:15, Jan Beulich wrote: >>> As of Xen 4.7 PV CPUID doesn't expose either of CPUID[1].ECX[7] and >>> CPUID[0x8007].EDX[7] anymore, causing the driver to fail to load on >>> both Intel and AMD systems. Doing

Re: [PATCH] xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7

2016-07-08 Thread David Vrabel
On 08/07/16 13:15, Jan Beulich wrote: > As of Xen 4.7 PV CPUID doesn't expose either of CPUID[1].ECX[7] and > CPUID[0x8007].EDX[7] anymore, causing the driver to fail to load on > both Intel and AMD systems. Doing any kind of hardware capability > checks in the driver as a prerequisite was wron

Re: [Xen-devel] [PATCH 0/2] xenbus: xenbus_dev_request_and_reply() adjustments

2016-07-08 Thread David Vrabel
On 07/07/16 08:25, Jan Beulich wrote: > 1: don't bail early from xenbus_dev_request_and_reply() > 2: simplify xenbus_dev_request_and_reply() Applied to for-linus-4.7b, thanks. David

Re: [Xen-devel] [PATCH 1/2] xenbus: don't bail early from xenbus_dev_request_and_reply()

2016-07-08 Thread David Vrabel
On 07/07/16 14:35, Jan Beulich wrote: >>>> On 07.07.16 at 15:22, wrote: >> On 07/07/16 14:13, David Vrabel wrote: >>> On 07/07/16 13:23, Jan Beulich wrote: >>>>>>> On 07.07.16 at 14:17, wrote: >>>>> On 07/07/16 13:09, Jan Beulich wro

Re: [Xen-devel] [PATCH 1/2] xenbus: don't bail early from xenbus_dev_request_and_reply()

2016-07-07 Thread David Vrabel
On 07/07/16 14:13, David Vrabel wrote: > On 07/07/16 13:23, Jan Beulich wrote: >>>>> On 07.07.16 at 14:17, wrote: >>> On 07/07/16 13:09, Jan Beulich wrote: >>>>>>> On 07.07.16 at 13:36, wrote: >>>>> On 07/07/16 08:32, Jan Beulich

Re: [Xen-devel] [PATCH 1/2] xenbus: don't bail early from xenbus_dev_request_and_reply()

2016-07-07 Thread David Vrabel
On 07/07/16 13:23, Jan Beulich wrote: On 07.07.16 at 14:17, wrote: >> On 07/07/16 13:09, Jan Beulich wrote: >> On 07.07.16 at 13:36, wrote: On 07/07/16 08:32, Jan Beulich wrote: > We must not skip the transaction_end() call for a failed > XS_TRANSACTION_START. The removed co

Re: [Xen-devel] [PATCH 1/2] xenbus: don't bail early from xenbus_dev_request_and_reply()

2016-07-07 Thread David Vrabel
On 07/07/16 13:09, Jan Beulich wrote: On 07.07.16 at 13:36, wrote: >> On 07/07/16 08:32, Jan Beulich wrote: >>> We must not skip the transaction_end() call for a failed >>> XS_TRANSACTION_START. The removed code fragment got introduced by >>> commit 027bd7e899 ("xen/xenbus: Avoid synchronous

Re: [Xen-devel] [PATCH 1/2] xenbus: don't bail early from xenbus_dev_request_and_reply()

2016-07-07 Thread David Vrabel
On 07/07/16 08:32, Jan Beulich wrote: > We must not skip the transaction_end() call for a failed > XS_TRANSACTION_START. The removed code fragment got introduced by > commit 027bd7e899 ("xen/xenbus: Avoid synchronous wait on XenBus > stalling shutdown/restart") without its description really indica

Re: [Xen-devel] [PATCH] xenbus: don't BUG() on user mode induced condition

2016-07-07 Thread David Vrabel
On 07/07/16 08:23, Jan Beulich wrote: > Inability to locate a user mode specified transaction ID should not > lead to a kernel crash. For other than XS_TRANSACTION_START also > don't issue anything to xenbus if the specified ID doesn't match that > of any active transaction. Applied to for-linus-4

Re: [Xen-devel] [PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible

2016-07-07 Thread David Vrabel
On 07/07/16 11:26, David Vrabel wrote: > On 07/07/16 09:06, Jan Beulich wrote: >> ... as being the simpler variant. > [...] >> --- 4.7-rc6-prefer-xenbus_write.orig/drivers/block/xen-blkback/xenbus.c >> +++ 4.7-rc6-prefer-xenbus_write/drivers/block/xen-blkback/xenbus.c >&

Re: [Xen-devel] [PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible

2016-07-07 Thread David Vrabel
On 07/07/16 09:06, Jan Beulich wrote: > ... as being the simpler variant. [...] > --- 4.7-rc6-prefer-xenbus_write.orig/drivers/block/xen-blkback/xenbus.c > +++ 4.7-rc6-prefer-xenbus_write/drivers/block/xen-blkback/xenbus.c > @@ -617,9 +617,9 @@ static int xen_blkbk_probe(struct xenbus >

Re: [Xen-devel] [PATCH] xen/mcelog: also build for x86-32

2016-07-07 Thread David Vrabel
On 07/07/16 08:35, Jan Beulich wrote: > There's no reason why this would need to be limited to x86-64. Did you test it? David

Re: [Xen-devel] [PATCH] xen/privcmd: sprinkle around cond_resched() calls in mmap ioctl handling

2016-07-07 Thread David Vrabel
On 07/07/16 08:35, Jan Beulich wrote: > Many of these operations can take arbitrarily long, which can become a > problem irrespective of them being exposed to privileged users only. If this is a concern I would rather see large numbers of mapping requests processed in smaller batches. This would

Re: [Xen-devel] [PATCH v2 0/3] xen: add full support for CONFIG_PARAVIRT_TIME_ACCOUNTING

2016-07-06 Thread David Vrabel
On 06/07/16 06:00, Juergen Gross wrote: > With most recent Xen hypervisor (4.8) it is now possible to add full > support of CONFIG_PARAVIRT_TIME_ACCOUNTING. > > To be applied on top of commit ed2f61fdd2356c2a1d1239aa1507ce4e2e059306 > "xen: add steal_clock support on x86" of kernel/git/xen/tip.git

Re: [Xen-devel] [PATCH v4 0/7] xen-pciback: misc cleanup

2016-07-06 Thread David Vrabel
On 06/07/16 07:47, Jan Beulich wrote: > The first five patches are the result of the requested split of > "xen-pciback: clean up {bar,rom}_init()", with Boris'es R-b > dropped despite there not being any functional change (the > mechanical change appears too significant to retain it). The > remaini

Re: [Xen-devel] [PATCH] x86/xen: Use DIV_ROUND_UP

2016-06-29 Thread David Vrabel
On 29/06/16 16:00, Amitoj Kaur Chawla wrote: > The kernel.h macro DIV_ROUND_UP performs the computation > (((n) + (d) - 1) /(d)) but is perhaps more readable. > > The Coccinelle script used to make this change is as follows: > @haskernel@ > @@ > > #include > > @depends on haskernel@ > expressio

Re: [Xen-devel] [PATCH v2] xen: xenbus: Remove create_workqueue

2016-06-29 Thread David Vrabel
On 31/05/16 17:56, Bhaktipriya Shridhar wrote: > System workqueues have been able to handle high level of concurrency > for a long time now and there's no reason to use dedicated workqueues > just to gain concurrency. Replace dedicated xenbus_frontend_wq with the > use of system_wq. > > Unlike a

Re: [Xen-devel] [PATCH v2] xen: xen-pciback: Remove create_workqueue

2016-06-29 Thread David Vrabel
On 01/06/16 15:15, Bhaktipriya Shridhar wrote: > System workqueues have been able to handle high level of concurrency > for a long time now and there's no reason to use dedicated workqueues > just to gain concurrency. Replace dedicated xen_pcibk_wq with the > use of system_wq. > > Unlike a dedica

Re: [Xen-devel] [PATCH v2 2/2] xen-pciback: clean up {bar, rom}_init()

2016-06-29 Thread David Vrabel
On 27/06/16 08:24, Jan Beulich wrote: On 24.06.16 at 17:01, wrote: >> On 07/06/16 07:31, Jan Beulich wrote: >>> - drop unused function parameter of read_dev_bar() >>> - drop rom_init() (now identical to bar_init()) >>> - fold read_dev_bar() into its now single caller >>> - simplify determinat

Re: [PATCH linux 0/8] xen: pvhvm: support bootup on secondary vCPUs

2016-06-29 Thread David Vrabel
On 29/06/16 10:16, Vitaly Kuznetsov wrote: > David Vrabel writes: > >> On 28/06/16 17:47, Vitaly Kuznetsov wrote: >>> It may happen that Xen's and Linux's ideas of vCPU id diverge. In >>> particular, when we crash on a secondary vCPU we may want to do kdum

Re: [Xen-devel] [PATCH linux 4/8] x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to the shared_info page

2016-06-29 Thread David Vrabel
On 28/06/16 17:47, Vitaly Kuznetsov wrote: > shared_info page has space for 32 vcpu info slots for first 32 vCPUs but > these are the first 32 vCPUs from Xen's perspective and we should map them > accordingly with the newly introduced xen_vcpu_id mapping. > > Signed-off-by: Vitaly Kuznetsov > ---

Re: [Xen-devel] [PATCH linux 3/8] x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op

2016-06-29 Thread David Vrabel
On 28/06/16 17:47, Vitaly Kuznetsov wrote: > HYPERVISOR_vcpu_op passes Linux's idea of vCPU id as a parameter while > Xen's idea is expected. In some cases these ideas diverge so we need to > do remapping. > > There is an issue, however. PV guests do VCPUOP_is_up very early > (see xen_fill_possibl

[PATCHv3 0/2] libfs,xenfs: replace /proc/xen/xenbus with a symlink

2016-06-28 Thread David Vrabel
Using /proc/xen/xenbus can cause deadlocks on the atomic file position mutex since this file should behave like a character device and not a regular file. This is easiest to achive by making it a symlink to the existing /dev/xen/xenbus device. This requires extending simple_fill_super() to add sy

[PATCHv3 2/2] xenfs: replace xenbus and privcmd with symlinks

2016-06-28 Thread David Vrabel
identical to the character device /dev/xen/xenbus so replace the file with a symlink. Similarly, replace /proc/xen/privcmd with a symlink since it should be the same as /dev/xen/privcmd. Signed-off-by: David Vrabel --- v2: - remove unneeded includes --- drivers/xen/xenfs/super.c | 10 -- 1

[PATCHv3 1/2] libfs: allow simple_fill_super() to add symlinks

2016-06-28 Thread David Vrabel
simple_fill_super() will add symlinks if an entry has mode & S_IFLNK. The target is provided in the new "link" field. Signed-off-by: David Vrabel --- v2: - simplified. --- fs/libfs.c | 15 +-- include/linux/fs.h | 2 +- 2 files changed, 14 insertions(+

Re: [PATCH linux 0/8] xen: pvhvm: support bootup on secondary vCPUs

2016-06-28 Thread David Vrabel
On 28/06/16 17:47, Vitaly Kuznetsov wrote: > It may happen that Xen's and Linux's ideas of vCPU id diverge. In > particular, when we crash on a secondary vCPU we may want to do kdump > and unlike plain kexec where we do migrate_to_reboot_cpu() we try booting > on the vCPU which crashed. This doesn'

Re: [Xen-devel] [PATCH v2 2/2] xen-pciback: clean up {bar,rom}_init()

2016-06-24 Thread David Vrabel
On 07/06/16 07:31, Jan Beulich wrote: > - drop unused function parameter of read_dev_bar() > - drop rom_init() (now identical to bar_init()) > - fold read_dev_bar() into its now single caller > - simplify determination of 64-bit memory resource > - use const and unsigned Please split this in 5 sep

Re: [Xen-devel] [PATCH v3 1/2] xen-pciback: return proper values during BAR sizing

2016-06-24 Thread David Vrabel
On 24/06/16 10:13, Jan Beulich wrote: > Reads following writes with all address bits set to 1 should return all > changeable address bits as one, not the BAR size (nor, as was the case > for the upper half of 64-bit BARs, the high half of the region's end > address). Presumably this didn't cause an

[GIT PULL] xen: bug fixes for 4.7-rc4

2016-06-24 Thread David Vrabel
+-- drivers/xen/xen-pciback/conf_space_header.c | 18 --- 4 files changed, 58 insertions(+), 68 deletions(-) Andrey Grodzovsky (1): xen/pciback: Fix conf_space read/write overlap check. David Vrabel (1): x86/xen: avoid m2p lookup when setting early page table entries Jan Beulich (1

Re: [Xen-devel] [PATCH] xen: fix upper bound of pmd loop in xen_cleanhighmap()

2016-06-23 Thread David Vrabel
On 23/06/16 06:12, Juergen Gross wrote: > xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper > bound of the loop setting non-kernel-image entries to zero should not > exceed the size of level2_kernel_pgt. Applied to for-linus-4.7b, thanks. David

Re: [Xen-devel] [PATCH] xen/PMU: Log VPMU initialization error at lower level

2016-06-21 Thread David Vrabel
On 21/06/16 15:17, Boris Ostrovsky wrote: > This will match how PMU errors are reported at check_hw_exists()'s > msr_fail label, which is reached when VPMU initialzation fails. Applied to for-linus-4.8, thanks. David

Re: [Xen-devel] [PATCH v4] xen: add steal_clock support on x86

2016-06-21 Thread David Vrabel
On 20/05/16 08:26, Juergen Gross wrote: > The pv_time_ops structure contains a function pointer for the > "steal_clock" functionality used only by KVM and Xen on ARM. Xen on x86 > uses its own mechanism to account for the "stolen" time a thread wasn't > able to run due to hypervisor scheduling. >

Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame

2016-06-13 Thread David Vrabel
On 13/06/16 11:50, Julien Grall wrote: > The version 1 of the grant-table protocol only supports frame encoded on > 32-bit. > > When the platform is supporting 48-bit physical address, the frame will > be encoded on 36-bit which will lead a truncation and give access to > the wrong frame. > > On

Re: [Xen-devel] [PATCHv1 1/2] libfs: allow simple_fill_super() to add symlinks

2016-06-10 Thread David Vrabel
On 17/05/16 11:27, David Vrabel wrote: > simple_fill_super() will add symlinks if an entry has mode & S_IFLNK. > The target is provided in the new "link" field. Ping? > Signed-off-by: David Vrabel > --- > v2: > - simplified. > --- > fs/libfs.c | 15

Re: [Xen-devel] [PATCH v2] xen: xen-pciback: Remove create_workqueue

2016-06-01 Thread David Vrabel
onnect() for every pdev to ensure that > there is no pending task while disconnecting the driver. > > Signed-off-by: Bhaktipriya Shridhar > --- > Changes in v2: > -Changed cancel_work_sync to flush_work > -Changed commit description > > Feedback to update a c

Re: [Xen-devel] [PATCH] xen: xenbus: Remove create_workqueue

2016-05-31 Thread David Vrabel
On 27/05/16 19:50, Bhaktipriya Shridhar wrote: > With concurrency managed workqueues, use of dedicated workqueues can be > replaced by using system_wq. Drop xenbus_frontend_wq by using system_wq. > > Since there is only a single work item, increase of concurrency level by > switching to system_wq

Re: [PATCH] xen: xen-pciback: Remove create_workqueue

2016-05-31 Thread David Vrabel
On 27/05/16 17:32, Konrad Rzeszutek Wilk wrote: > On Fri, May 27, 2016 at 12:08:22PM -0400, Tejun Heo wrote: >> Hello, >> >> On Fri, May 27, 2016 at 12:01:14PM -0400, Konrad Rzeszutek Wilk wrote: >>> On Fri, May 27, 2016 at 09:24:11PM +0530, Bhaktipriya Shridhar wrote: With concurrency managed

Re: [Xen-devel] [PATCH v2] xen: use vma_pages().

2016-05-26 Thread David Vrabel
On 24/05/16 01:04, Muhammad Falak R Wani wrote: > Replace explicit computation of vma page count by a call to > vma_pages(). Applied to for-linus-4.8, thanks. David

Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration

2016-05-26 Thread David Vrabel
On 11/05/16 14:07, Arnd Bergmann wrote: > A bugfix patch for the xen balloon driver introduced a forward > declaration for a static function that is conditionally compiled, > causing a warning if only the declaration but not the definition > are there: > > drivers/xen/balloon.c:154:13: error: 'rel

Re: [Xen-devel] [PATCH v2] xen/balloon: Fix declared-but-not-defined warning

2016-05-26 Thread David Vrabel
On 10/05/16 10:27, Ross Lagerwall wrote: > Fix a declared-but-not-defined warning when building with > XEN_BALLOON_MEMORY_HOTPLUG=n. This fixes a regression introduced by > commit dfd74a1edfab > ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE"). Applied to for-linus-4.7b, thanks. I hav

Re: [Xen-devel] [PATCH 1/7] x86/xen: Simplify set_aliased_prot

2016-05-25 Thread David Vrabel
On 24/05/16 23:48, Andy Lutomirski wrote: > In aa1acff356bb ("x86/xen: Probe target addresses in > set_aliased_prot() before the hypercall"), I added an explicit probe > to work around a hypercall issue. The code can be simplified by > using probe_kernel_read. Acked-by: David Vrabel David

[GIT PULL] xen: bug fixes for 4.7-rc0

2016-05-24 Thread David Vrabel
: don't warn about 2-byte wchar_t in efi David Vrabel (1): xen/gntdev: reduce copy batch size to 16 Juergen Gross (1): xen: use same main loop for counting and remapping pages Ross Lagerwall (1): xen/events: Don't move disabled irqs Stefano Stabellini (2): xen/

Re: [Xen-devel] [PATCH] xen: use same main loop for counting and remapping pages

2016-05-24 Thread David Vrabel
On 18/05/16 15:44, Juergen Gross wrote: > Instead of having two functions for cycling through the E820 map in > order to count to be remapped pages and remap them later, just use one > function with a caller supplied sub-function called for each region to > be processed. This eliminates the possibi

Re: [PATCH] x86,locking: Remove ticket (spin)lock implementation

2016-05-19 Thread David Vrabel
On 18/05/16 19:43, Peter Zijlstra wrote: > > We've unconditionally used the queued spinlock for many releases now. > > Its time to remove the old ticket lock code. Xen parts: Acked-by: David Vrabel David

Re: [PATCH] xen: add steal_clock support on x86

2016-05-18 Thread David Vrabel
On 18/05/16 16:51, Juergen Gross wrote: > On 18/05/16 17:45, David Vrabel wrote: >> On 18/05/16 16:42, Juergen Gross wrote: >>> On 18/05/16 17:25, Boris Ostrovsky wrote: >>>> On 05/18/2016 10:53 AM, Juergen Gross wrote: >>>>> On 18/05/16 16:46, Boris O

Re: [PATCH] xen: add steal_clock support on x86

2016-05-18 Thread David Vrabel
On 18/05/16 16:42, Juergen Gross wrote: > On 18/05/16 17:25, Boris Ostrovsky wrote: >> On 05/18/2016 10:53 AM, Juergen Gross wrote: >>> On 18/05/16 16:46, Boris Ostrovsky wrote: On 05/18/2016 08:15 AM, Juergen Gross wrote: > } > > +void __init xen_time_setup_guest(void) > +{

Re: [Xen-devel] [GIT PULL] EFI ARM Xen support

2016-05-17 Thread David Vrabel
On 17/05/16 11:12, Stefano Stabellini wrote: > On Sat, 14 May 2016, Matt Fleming wrote: >> Folks, >> >> Please pull the following branch which contains support for Xen on ARM >> EFI platforms. >> >> This merge includes a merge of Stefano's xen/linux-next branch to pull >> in the prerequisites requi

[PATCHv1 1/2] libfs: allow simple_fill_super() to add symlinks

2016-05-17 Thread David Vrabel
simple_fill_super() will add symlinks if an entry has mode & S_IFLNK. The target is provided in the new "link" field. Signed-off-by: David Vrabel --- v2: - simplified. --- fs/libfs.c | 15 +-- include/linux/fs.h | 2 +- 2 files changed, 14 insertions(+

  1   2   3   4   5   6   7   8   9   10   >