Re: [Xen-devel] [PATCH] xen: populate correct number of pages when across mem boundary

2012-07-16 Thread David Vrabel
On 04/07/12 07:49, zhenzhong.duan wrote: When populate pages across a mem boundary at bootup, the page count populated isn't correct. This is due to mem populated to non-mem region and ignored. Pfn range is also wrongly aligned when mem boundary isn't page aligned. Also need consider the

Re: [Xen-devel] [patch 1/3] xen/privcmd: check for integer overflow in ioctl

2012-09-10 Thread David Vrabel
On 08/09/12 10:52, Dan Carpenter wrote: If m.num is too large then the m.num * sizeof(*m.arr) multiplication could overflow and the access_ok() check wouldn't test the right size. m.num is range checked later on so it doesn't matter that the access_ok() checks might be wrong. A bit subtle,

Re: [Xen-devel] [patch 3/3] xen/privcmd: remove const modifier from declaration

2012-09-10 Thread David Vrabel
On 10/09/12 10:03, Jan Beulich wrote: On 08.09.12 at 11:58, Dan Carpenter dan.carpen...@oracle.com wrote: When we use this pointer, we cast away the const modifier and modify the data. I think it was an accident to declare it as const. NAK - the const is very valid here, as the v2 interface

Re: [Xen-devel] [PATCH v3 00/11] xen: Initial kexec/kdump implementation

2013-01-07 Thread David Vrabel
On 04/01/13 14:22, Daniel Kiper wrote: On Wed, Jan 02, 2013 at 11:26:43AM +, Andrew Cooper wrote: On 27/12/12 18:02, Eric W. Biederman wrote: Andrew Cooperandrew.coop...@citrix.com writes: On 27/12/2012 07:53, Eric W. Biederman wrote: The syscall ABI still has the wrong semantics. Aka

Re: [Xen-devel] [PATCH v3 00/11] xen: Initial kexec/kdump implementation

2013-01-10 Thread David Vrabel
On 04/01/13 17:01, Daniel Kiper wrote: On Fri, Jan 04, 2013 at 02:38:44PM +, David Vrabel wrote: On 04/01/13 14:22, Daniel Kiper wrote: On Wed, Jan 02, 2013 at 11:26:43AM +, Andrew Cooper wrote: On 27/12/12 18:02, Eric W. Biederman wrote: Andrew Cooperandrew.coop...@citrix.com writes

Re: [Xen-devel] [PATCH v3 00/11] xen: Initial kexec/kdump implementation

2013-01-11 Thread David Vrabel
On 11/01/13 13:22, Daniel Kiper wrote: On Thu, Jan 10, 2013 at 02:19:55PM +, David Vrabel wrote: On 04/01/13 17:01, Daniel Kiper wrote: My .5 cents: - We should focus on KEXEC_CMD_kexec_load and KEXEC_CMD_kexec_unload; probably we should introduce KEXEC_CMD_kexec_load2

Re: [Xen-devel] [PATCH linux-next] xen/multicall: xen_mc_callback(): avoid buffer overflow

2013-02-11 Thread David Vrabel
On 08/02/2013 20:34, Tim Gardner wrote: This buffer overflow was introduced with 91e0c5f3dad47838cb2ecc1865ce789a0b7182b1 (2.6.24). There's no buffer overflow here. xen_mc_flush() resets b-cbidx. David arch/x86/xen/multicalls.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH RFC v5 7/8] pvqspinlock, x86: Add qspinlock para-virtualization support

2014-02-27 Thread David Vrabel
On 26/02/14 15:14, Waiman Long wrote: This patch adds para-virtualization support to the queue spinlock code by enabling the queue head to kick the lock holder CPU, if known, in when the lock isn't released for a certain amount of time. It also enables the mutual monitoring of the queue head

Re: [PATCH RFC v5 4/8] pvqspinlock, x86: Allow unfair spinlock in a real PV environment

2014-02-27 Thread David Vrabel
On 26/02/14 15:14, Waiman Long wrote: Locking is always an issue in a virtualized environment as the virtual CPU that is waiting on a lock may get scheduled out and hence block any progress in lock acquisition even when the lock has been freed. One solution to this problem is to allow unfair

Re: [PATCH RFC v5 7/8] pvqspinlock, x86: Add qspinlock para-virtualization support

2014-02-27 Thread David Vrabel
On 27/02/14 13:11, Paolo Bonzini wrote: Il 27/02/2014 13:11, David Vrabel ha scritto: This patch adds para-virtualization support to the queue spinlock code by enabling the queue head to kick the lock holder CPU, if known, in when the lock isn't released for a certain amount of time

Re: [Xen-devel] [PATCH RFC v5 7/8] pvqspinlock, x86: Add qspinlock para-virtualization support

2014-03-03 Thread David Vrabel
On 27/02/14 15:50, Paolo Bonzini wrote: Il 27/02/2014 16:22, Raghavendra K T ha scritto: On 02/27/2014 08:15 PM, Paolo Bonzini wrote: [...] But neither of the VCPUs being kicked here are halted -- they're either running or runnable (descheduled by the hypervisor). /me actually looks at

Re: [PATCH RFC v5 4/8] pvqspinlock, x86: Allow unfair spinlock in a real PV environment

2014-03-04 Thread David Vrabel
On 04/03/14 15:15, Waiman Long wrote: On 03/03/2014 05:55 AM, Paolo Bonzini wrote: Il 28/02/2014 18:06, Waiman Long ha scritto: On 02/26/2014 12:07 PM, Konrad Rzeszutek Wilk wrote: On Wed, Feb 26, 2014 at 10:14:24AM -0500, Waiman Long wrote: Locking is always an issue in a virtualized

Re: [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest

2014-03-13 Thread David Vrabel
On 12/03/14 18:54, Waiman Long wrote: Locking is always an issue in a virtualized environment as the virtual CPU that is waiting on a lock may get scheduled out and hence block any progress in lock acquisition even when the lock has been freed. One solution to this problem is to allow unfair

Re: [PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support

2014-03-13 Thread David Vrabel
On 12/03/14 18:54, Waiman Long wrote: This patch adds para-virtualization support to the queue spinlock in the same way as was done in the PV ticket lock code. In essence, the lock waiters will spin for a specified number of times (QSPIN_THRESHOLD = 2^14) and then halted itself. The queue head

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread David Vrabel
On 29/10/14 13:45, Paolo Bonzini wrote: On 10/29/2014 11:37 AM, Andrew Cooper wrote: While testing various nested combinations, XenServer has found that modern Windows Server versions must have the hypervisor bit hidden from them for them to be happy running HyperV, despite the fact that

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-30 Thread David Vrabel
On 29/10/14 05:19, Andy Lutomirski wrote: CPUID leaf 4F02H: miscellaneous features [...] ### CommonHV RNG If CPUID.4F02H.EAX is nonzero, then it contains an MSR index used to communicate with a hypervisor random number generator. This

Re: [Xen-devel] [PATCH v14 11/11] pvqspinlock, x86: Enable PV qspinlock for XEN

2015-01-21 Thread David Vrabel
On 20/01/15 20:12, Waiman Long wrote: This patch adds the necessary XEN specific code to allow XEN to support the CPU halting and kicking operations needed by the queue spinlock PV code. Xen is a word, please don't capitalize it. +void xen_lock_stats(int stat_types) +{ + if (stat_types

Re: [Xen-devel] [PATCH V5] x86 spinlock: Fix memory corruption on completing completions

2015-02-16 Thread David Vrabel
) { add_stats(RELEASED_SLOW_KICKED, 1); xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR); break; Acked-by: David Vrabel david.vra...@citrix.com Although some of the ACCESS_ONCE to READ_ONCE changes are cosmetic and are perhaps best left out

Re: [Xen-devel] kasan_map_early_shadow() on Xen

2015-03-03 Thread David Vrabel
On 03/03/15 09:40, Luis R. Rodriguez wrote: Andrey, I believe that on Xen we should disable kasan, would like confirmation Why? This is the first of heard of this. from someone on xen-devel though. Here's the thing though -- if true -- I'd like to do it *properly*, where *properly* means

Re: [Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen

2015-04-08 Thread David Vrabel
On 07/04/15 03:55, Waiman Long wrote: This patch adds the necessary Xen specific code to allow Xen to support the CPU halting and kicking operations needed by the queue spinlock PV code. This basically looks the same as the version I wrote, except I think you broke it. +static void

Re: [PATCH] paravirt: remove unused pv_apic_ops structure

2015-11-17 Thread David Vrabel
On 17/11/15 13:44, Juergen Gross wrote: > The only member of that structure is startup_ipi_hook which is always > set to paravirt_nop. Reviewed-by: David Vrabel <david.vra...@citrix.com> David ___ Virtualization mailing list Virtualization

Re: [Xen-devel] [PATCH RFC 0/3] Xen on Virtio

2015-12-14 Thread David Vrabel
On 07/12/15 16:19, Stefano Stabellini wrote: > Hi all, > > this patch series introduces support for running Linux on top of Xen > inside a virtual machine with virtio devices (nested virt scenario). > The problem is that Linux virtio drivers use virt_to_phys to get the > guest pseudo-physical

Re: [Xen-devel] [PATCH RFC 1/3] xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus

2015-12-14 Thread David Vrabel
On 07/12/15 16:19, Stefano Stabellini wrote: > Signed-off-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> Can you add a brief description about why these are being moved? Then, assuming this is needed in the end: Acked-by: David Vrabel <david.vra...@citrix

Re: [Xen-devel] [PATCH v2 34/34] xen/io: use virt_xxx barriers

2016-01-04 Thread David Vrabel
non-SMP guest runs on an SMP host. > > Switch to virt_xxx barriers which serve this exact purpose. Acked-by: David Vrabel <david.vra...@citrix.com> David ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxf

Re: [Xen-devel] [PATCH v2 33/34] xenbus: use virt_xxx barriers

2016-01-04 Thread David Vrabel
non-SMP guest runs on an SMP host. > > Switch to virt_xxx barriers which serve this exact purpose. Acked-by: David Vrabel <david.vra...@citrix.com> If you're feeling particularly keen there's a rmb() consume_one_event() in drivers/xen/events/events_fifo.c that can be converted

Re: [Xen-devel] new barrier type for paravirt (was Re: [PATCH] virtio_ring: use smp_store_mb)

2015-12-21 Thread David Vrabel
On 20/12/15 09:25, Michael S. Tsirkin wrote: > > I noticed that drivers/xen/xenbus/xenbus_comms.c uses > full memory barriers to communicate with the other side. > For example: > > /* Must write data /after/ reading the consumer index. * */ > mb(); > >

Re: [PATCH v3 39/41] xen/events: use virt_xxx barriers

2016-01-11 Thread David Vrabel
witch to the virt_rmb barrier which serves this exact purpose. > > Pull in asm/barrier.h here to make sure the file is self-contained. > > Suggested-by: David Vrabel <david.vra...@citrix.com> > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-b

Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen

2016-01-29 Thread David Vrabel
On 29/01/16 02:31, Andy Lutomirski wrote: > Signed-off-by: Andy Lutomirski > --- > drivers/virtio/virtio_ring.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index c169c6444637..305c05cc249a

Re: [PATCH v7 9/9] vring: Use the DMA API on Xen

2016-02-03 Thread David Vrabel
On 03/02/16 05:46, Andy Lutomirski wrote: > Signed-off-by: Andy Lutomirski You forgot the previous Reviewed-by tags. David ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH v6 9/9] vring: Use the DMA API on Xen

2016-02-01 Thread David Vrabel
On 01/02/16 18:00, Andy Lutomirski wrote: > Signed-off-by: Andy Lutomirski <l...@kernel.org> Reviewed-by: David Vrabel <david.vra...@citrix.com> Thanks. David ___ Virtualization mailing list Virtualization@lists.linux-found

Re: [Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-03-21 Thread David Vrabel
On 21/03/16 13:42, Jan Beulich wrote: > > Also don't you need to call smp_processor_id() after preempt_disable()? I suggest using get_cpu()/put_cpu() here. David ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [Xen-devel] [PATCH v4 4/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-05 Thread David Vrabel
On 05/04/16 11:01, Juergen Gross wrote: > > No, I don't think this is a good idea. In the EINVAL or EBUSY case a > simple Xen admin command might be enough to make the next call succeed. > I don't want to disable pinning in this case. Ok. Acked-by: David Vrabel <david.vra...@cit

Re: [Xen-devel] [PATCH v4 1/6] xen: sync xen header

2016-04-05 Thread David Vrabel
On 05/04/16 06:10, Juergen Gross wrote: > Import the actual version of include/xen/interface/sched.h from Xen. Acked-by: David Vrabel <david.vra...@citrix.com> David ___ Virtualization mailing list Virtualization@lists.linux-foundation.

Re: [Xen-devel] [PATCH v4 4/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-05 Thread David Vrabel
On 05/04/16 06:10, Juergen Gross wrote: > Some hardware models (e.g. Dell Studio 1555 laptops) require calls to > the firmware to be issued on cpu 0 only. As Dom0 might have to use > these calls, add xen_pin_vcpu() to achieve this functionality. > > In case either the domain doesn't have the