Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-20 Thread Konrad Rzeszutek Wilk
On Mon, May 20, 2013 at 11:24:04AM +0100, Stefano Stabellini wrote: On Fri, 17 May 2013, Zhenzhong Duan wrote: On 2013-05-15 17:41, Stefano Stabellini wrote: On Tue, 14 May 2013, Konrad Rzeszutek Wilk wrote: On Tue, May 14, 2013 at 02:49:50PM +0100, Stefano Stabellini wrote: On Mon

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-20 Thread Konrad Rzeszutek Wilk
/init.h #include xen/xen.h #include xen/page.h #include asm/xen/hypervisor.h #include xen/features.h #include xen/events.h MODULE_AUTHOR(Konrad Rzeszutek Wilk konrad.w...@oracle.com); MODULE_DESCRIPTION(alloc_and_unmap); MODULE_LICENSE(GPL); MODULE_VERSION(0.1); static int do_it(void

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-20 Thread Konrad Rzeszutek Wilk
At this point I think that upstream option is to save the PIRQ value and re-use it. Will post a patch for it. Here is the patch. It works for me when passing in a NIC driver. From 509499568d1cdf1f2a3fb53773c991f4b063eb56 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk konrad.w

Re: Bye bye Mr tmem guy

2013-05-20 Thread Konrad Rzeszutek Wilk
On Mon, May 20, 2013 at 08:51:47AM -0700, Dan Magenheimer wrote: Hi Linux kernel folks and Xen folks -- Effective July 5, I will be resigning from Oracle and retiring for a minimum of 12-18 months and probably/hopefully much longer. Between now and July 5, I will be tying up loose ends

[GIT PULL] (xen) stable/for-linus-3.10-rc1-tag

2013-05-20 Thread Konrad Rzeszutek Wilk
Carpenter (1): xen/privcmd: fix condition in privcmd_close() Konrad Rzeszutek Wilk (9): xen/tmem: Cleanup. Remove the parts that say temporary. xen/tmem: Move all of the boot and module parameters to the top of the file. xen/tmem: Split out the different module/boot options

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Konrad Rzeszutek Wilk
/kthread.h #include linux/pagemap.h #include linux/init.h #include xen/xen.h #include xen/page.h #include asm/xen/hypervisor.h #include xen/features.h #include xen/events.h MODULE_AUTHOR(Konrad Rzeszutek Wilk konrad.w...@oracle.com); MODULE_DESCRIPTION(alloc_and_unmap); MODULE_LICENSE(GPL); MODULE_VERSION

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Konrad Rzeszutek Wilk
On Tue, May 21, 2013 at 05:51:02PM +0100, Stefano Stabellini wrote: On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: Looking at the hypervisor code I couldn't see anything obviously wrong. I think the culprit is physdev_unmap_pirq: if ( is_hvm_domain(d

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Konrad Rzeszutek Wilk
On Tue, May 21, 2013 at 10:50:09PM +0100, Stefano Stabellini wrote: On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: On Tue, May 21, 2013 at 05:51:02PM +0100, Stefano Stabellini wrote: On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: Looking at the hypervisor code I couldn't see

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Konrad Rzeszutek Wilk
On Wed, May 22, 2013 at 10:37:39AM +0100, Jan Beulich wrote: On 22.05.13 at 00:41, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Tue, May 21, 2013 at 10:50:09PM +0100, Stefano Stabellini wrote: We have to be careful about this: the point of PHYSDEVOP_get_free_pirq is that Linux

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Konrad Rzeszutek Wilk
On Wed, May 22, 2013 at 04:25:10PM +0100, Jan Beulich wrote: On 22.05.13 at 17:14, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: The physdev_unmap_pirq (from PHYSDEVOP_unmap_pirq), only has this check: if (domain_pirq_to_emuirq(d, pirq) != IRQ_UNBOUND) and since

Re: [PATCH v2] drivers/tpm: add xen tpmfront interface

2013-05-22 Thread Konrad Rzeszutek Wilk
On Thu, Apr 11, 2013 at 10:56:01AM -0400, Daniel De Graaf wrote: This is a complete rewrite of the Xen TPM frontend driver, taking advantage of a simplified frontend/backend interface and adding support for cancellation and timeouts. The backend for this driver is provided by a vTPM stub

Re: [tpmdd-devel] [PATCH v2] drivers/tpm: add xen tpmfront interface

2013-05-22 Thread Konrad Rzeszutek Wilk
On Wed, May 22, 2013 at 02:47:01PM -0500, Kent Yoder wrote: + notify_remote_via_evtchn(priv-evtchn); + + ordinal = be32_to_cpu(*((__be32 *) (buf + 6))); Um, + 6? Why? Is there an #define for that magic constant? Should this value be read before you do the wait_for_tpm_stat

Re: [tpmdd-devel] [PATCH v2] drivers/tpm: add xen tpmfront interface

2013-05-24 Thread Konrad Rzeszutek Wilk
On Wed, May 22, 2013 at 05:12:24PM -0500, Kent Yoder wrote: On Wed, May 22, 2013 at 3:57 PM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Wed, May 22, 2013 at 02:47:01PM -0500, Kent Yoder wrote: + notify_remote_via_evtchn(priv-evtchn); + + ordinal = be32_to_cpu

Re: [PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-25 Thread Konrad Rzeszutek Wilk
+ * Turns out AMD IOMMU has a page table bug where it won't map large pages + * to a region that previously mapped smaller pages. This should be fixed + * soon, so this is just a temporary workaround to break mappings down into + * PAGE_SIZE. Better to map smaller pages than nothing. + */

Re: [PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-25 Thread Konrad Rzeszutek Wilk
On Fri, May 24, 2013 at 11:24:26AM -0600, Alex Williamson wrote: This series let's the vfio type1 iommu backend take advantage of iommu large page support. See patch 2/2 for the details. This has been tested on both amd_iommu and intel_iommu, but only my AMD system has large page support.

Re: [PATCH 3/2] vfio: Provide module option to disable vfio_iommu_type1 hugepage support

2013-05-28 Thread Konrad Rzeszutek Wilk
by loading vfio_iommu_type1 with disable_hugepages=1 or dynamically through sysfs. If enabled dynamically, only new mappings are restricted. Signed-off-by: Alex Williamson alex.william...@redhat.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- As suggested by Konrad

Re: [PATCH v4 1/4] xen: move xen_setup_runstate_info and get_runstate_snapshot to drivers/xen/time.c

2013-05-28 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 06:54:29PM +0100, Stefano Stabellini wrote: Signed-off-by: Stefano Stabellini stefano.stabell...@eu.citrix.com Acked-by: Ian Campbell ian.campb...@citrix.com CC: konrad.w...@oracle.com Changes in v2: - leave do_stolen_accounting in arch/x86/xen/time.c; - use the new

Re: [Xen-devel] [PATCH 2/3] timekeeping: sync persistent clock and RTC on system time step changes

2013-05-28 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 07:26:14PM +0100, David Vrabel wrote: On 15/05/13 19:10, John Stultz wrote: Ok, so really, as soon as the Dom0 time is set by NTP, all guests will see the right time? That makes more sense, and means the window for these sorts of issues is reasonably quite

Re: [PATCH 1/2] x86/xen: sync the CMOS RTC as well as the Xen wallclock

2013-05-28 Thread Konrad Rzeszutek Wilk
accessing EFI runtime services and Xen does not run on Moorsetown platforms so the CMOS RTC is the only supported hardware clock. Signed-off-by: David Vrabel david.vra...@citrix.com Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Ok, I've queued this for 3.11. Thanks. thanks -john

Re: [Xen-devel] [PATCH 2/3] timekeeping: sync persistent clock and RTC on system time step changes

2013-05-28 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 12:09:14PM -0700, John Stultz wrote: On 05/28/2013 11:31 AM, Konrad Rzeszutek Wilk wrote: On Tue, May 28, 2013 at 07:26:14PM +0100, David Vrabel wrote: On 15/05/13 19:10, John Stultz wrote: Ok, so really, as soon as the Dom0 time is set by NTP, all guests will see

Re: linux-next: Tree for May 28 (xen / frontswap)

2013-05-28 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 12:52:12PM -0700, Randy Dunlap wrote: On 05/28/13 00:21, Stephen Rothwell wrote: Hi all, Changes since 20130527: New tree: drm-tegra on x86_64: drivers/xen/tmem.c: In function 'xen_tmem_init': drivers/xen/tmem.c:410:7: error: 'frontswap' undeclared

Re: [Xen-devel] [PATCH 2/3] timekeeping: sync persistent clock and RTC on system time step changes

2013-05-28 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 01:11:33PM -0700, John Stultz wrote: On 05/28/2013 01:03 PM, John Stultz wrote: On 05/28/2013 12:48 PM, Konrad Rzeszutek Wilk wrote: On Tue, May 28, 2013 at 12:09:14PM -0700, John Stultz wrote: On 05/28/2013 11:31 AM, Konrad Rzeszutek Wilk wrote: On Tue, May 28, 2013

Re: [PATCH v3] drivers/tpm: add xen tpmfront interface

2013-05-28 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 11:40:32AM -0400, Daniel De Graaf wrote: This is a complete rewrite of the Xen TPM frontend driver, taking advantage of a simplified frontend/backend interface and adding support for cancellation and timeouts. The backend for this driver is provided by a vTPM stub

Re: [PATCH v9 01/18] arm: make SWIOTLB available

2013-10-29 Thread Konrad Rzeszutek Wilk
, provided by lib/iommu_helper.c. Signed-off-by: Stefano Stabellini stefano.stabell...@eu.citrix.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com CC: will.dea...@arm.com CC: li...@arm.linux.org.uk Changes in v8: - use __phys_to_pfn and __pfn_to_phys

Re: [v1 1/2] xen/p2m: Create identity mappings for PFNs beyound E820 and PCI BARs

2013-10-29 Thread Konrad Rzeszutek Wilk
On Tue, Oct 29, 2013 at 08:23:30AM +, Jan Beulich wrote: On 28.10.13 at 17:58, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Oct 25, 2013 at 04:08:19PM -0600, Bjorn Helgaas wrote: If you can look at PCI host bridge apertures instead of BARs, that would solve both

Re: [v1 1/2] xen/p2m: Create identity mappings for PFNs beyound E820 and PCI BARs

2013-10-29 Thread Konrad Rzeszutek Wilk
On Tue, Oct 29, 2013 at 02:55:13PM +, Jan Beulich wrote: On 29.10.13 at 15:45, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Tue, Oct 29, 2013 at 08:23:30AM +, Jan Beulich wrote: On 28.10.13 at 17:58, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Oct

[PATCH] xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved for MCFG areas.

2013-10-30 Thread Konrad Rzeszutek Wilk
...@oracle.com Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com [v1: Redid it a bit] [v2: Dropped the P2M 1-1 setting] --- drivers/xen/pci.c | 42 + include/xen/interface/physdev.h | 11 +++ 2 files changed, 53 insertions

Re: [Xen-devel] [PATCH net-next RFC 0/5] xen-netback: TX grant mapping instead of copy

2013-10-30 Thread Konrad Rzeszutek Wilk
On Wed, Oct 30, 2013 at 12:50:15AM +, Zoltan Kiss wrote: A long known problem of the upstream netback implementation that on the TX path (from guest to Dom0) it copies the whole packet from guest memory into Dom0. That simply became a bottleneck with 10Gb NICs, and generally it's a huge

Re: [Xen-devel] [PATCH net-next RFC 0/5] xen-netback: TX grant mapping instead of copy

2013-10-30 Thread Konrad Rzeszutek Wilk
On Wed, Oct 30, 2013 at 03:16:17PM -0400, Konrad Rzeszutek Wilk wrote: On Wed, Oct 30, 2013 at 12:50:15AM +, Zoltan Kiss wrote: A long known problem of the upstream netback implementation that on the TX path (from guest to Dom0) it copies the whole packet from guest memory into Dom0

Re: linux-next: Tree for Oct 30 (include/xen/swiotlb-xen.h)

2013-11-01 Thread Konrad Rzeszutek Wilk
On Wed, Oct 30, 2013 at 11:44:51AM -0700, Randy Dunlap wrote: On 10/30/13 00:45, Stephen Rothwell wrote: Hi all, News: I am now doing an arm multi_v7_defconfig build between each merge. Changes since 20131029: The arm defconfig build is fixed again. The net-next tree gained

Re: linux-next: Tree for Nov 1 (xen_swiotllb)

2013-11-01 Thread Konrad Rzeszutek Wilk
On Fri, Nov 01, 2013 at 11:16:26AM -0700, Randy Dunlap wrote: On 11/01/13 01:11, Stephen Rothwell wrote: Hi all, Changes since 20131031: The squashfs tree gained a build failure so I used the version from next-20131031. The block tree gained conflicts against the f2fs,

Re: [PATCH] drivers: xen-selfballoon: consider slab pages

2013-11-04 Thread Konrad Rzeszutek Wilk
On Mon, Nov 04, 2013 at 08:39:24PM +0800, Bob Liu wrote: Currently the goal_page in xen-selfballon doesn't consider much about pages used in kernel space. A typical usage is slab pages, without consider slab pages the goal_page result may be too rough and lead extra memory pressure to

Re: EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Konrad Rzeszutek Wilk
On Mon, Oct 21, 2013 at 02:36:38PM +0100, Jan Beulich wrote: On 21.10.13 at 14:57, Daniel Kiper daniel.ki...@oracle.com wrote: (Looking at the Cc list it's quite interesting that you copied a whole lot of people, but not me as the maintainer of the EFI bits in Xen.) I see this: From:

Re: [PATCH] x86 kconfig: Add recommendation to enable paravirt spinlock

2013-10-21 Thread Konrad Rzeszutek Wilk
On Mon, Oct 21, 2013 at 09:35:08PM +0530, Raghavendra K T wrote: Since paravirt spinlock optimization are in 3.12 kernel, we have very good performance benefit for paravirtualized KVM / Xen kernel. Also we no longer suffer from 5% side effect on native kernel. Yeey! Signed-off-by:

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 10:59:33AM +0100, Jan Beulich wrote: On 22.10.13 at 11:45, Ian Campbell ian.campb...@citrix.com wrote: On Tue, 2013-10-22 at 10:31 +0100, Jan Beulich wrote: On 22.10.13 at 11:26, Ian Campbell ian.campb...@citrix.com wrote: AIUI efilinux is somewhat badly named and

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 02:53:05PM +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 09:42 -0400, Konrad Rzeszutek Wilk wrote: Looking at the Fedora GRUB2 source, the 'struct linux_kernel_header' is defined in the linux/Documentation/x86/boot.txt and hpa is pretty strict about making

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 09:42:52AM -0400, Konrad Rzeszutek Wilk wrote: On Tue, Oct 22, 2013 at 10:59:33AM +0100, Jan Beulich wrote: On 22.10.13 at 11:45, Ian Campbell ian.campb...@citrix.com wrote: On Tue, 2013-10-22 at 10:31 +0100, Jan Beulich wrote: On 22.10.13 at 11:26, Ian Campbell

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 02:18:52PM +, Woodhouse, David wrote: I wonder why Linux can't make the EFI calls to fetch them itself? It can. It does. It prefers to. This is what the EFI boot stub is all about. But grub2 is crack-inspired and likes to do all kinds of crap that it

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 03:24:28PM +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 10:09 -0400, Konrad Rzeszutek Wilk wrote: So it can be booted the same way as xen.efi. But my understanding is that folks prefer a bootloader instead of loading the bzImage in an NVRAM of a platform

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 04:21:47PM +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 10:57 -0400, Konrad Rzeszutek Wilk wrote: That 'that' is a standard PE/COFF image? Could you please point me to the code that does that in GRUB2? As I said earlier in the thread, it's a patch which

Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 04:22:38PM +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 15:24 +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 10:09 -0400, Konrad Rzeszutek Wilk wrote: So it can be booted the same way as xen.efi. But my understanding is that folks prefer a bootloader

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 05:39:24PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 22.10.2013 16:51, Konrad Rzeszutek Wilk wrote: If you use 'linux' module, it will call ExitBootService. If you use 'multiboot' module, it will call ExitBootService too. So if you don't want

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 03:25:39PM +, Woodhouse, David wrote: On Tue, 2013-10-22 at 10:43 -0400, Konrad Rzeszutek Wilk wrote: And looking at bit deeper in the x86/linux boot spec: EFI HANDOVER PROTOCOL

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Konrad Rzeszutek Wilk
Are you (going to be) in Edinburgh? Matthew was just explaining a bunch of this stuff to me, it might be useful for you to get it from the horses mouth instead of laundered through my brain (which is a bit addled afterwards ;-)). Sadly no. However, if it is possible/needed I could

Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 09:32:30AM +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 12:26 -0400, Konrad Rzeszutek Wilk wrote: It can (at least in Linux). There are two entry points in the Linux kernel and - one when it is launched from 'linuxefi' (See efi_stub_entry in arch/x86/boot

Re: [PATCH] tracing/events: Fix swiotlb tracepoint creation

2013-10-23 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 01:32:04PM +0200, Thierry Reding wrote: Tracepoints are only created when Xen support is enabled, but they are also referenced within lib/swiotlb.c. So unless Xen support is enabled the tracepoints will be missing, therefore causing builds to fail. Fix this by moving

Re: [PATCH v8 17/19] grant-table: call set_phys_to_machine after mapping grant refs

2013-10-23 Thread Konrad Rzeszutek Wilk
On Thu, Oct 17, 2013 at 06:43:32PM +0100, Stefano Stabellini wrote: When mapping/unmapping grant refs, call set_phys_to_machine to update the P2M with the new mappings for autotranslate guests. Heh. That sounds so odd (p2m + xlat). Can you add a sentence saying that this is a mostly a nop on

Re: [PATCH v8 13/19] swiotlb-xen: use xen_dma_map/unmap_page, xen_dma_sync_single_for_cpu/device

2013-10-23 Thread Konrad Rzeszutek Wilk
On Thu, Oct 17, 2013 at 06:43:28PM +0100, Stefano Stabellini wrote: Call xen_dma_map_page, xen_dma_unmap_page, xen_dma_sync_single_for_cpu, xen_dma_sync_single_for_device from swiotlb-xen to ensure cpu/device coherency of the pages used for DMA, including the ones belonging to the swiotlb

Re: [PATCH v8 18/19] swiotlb-xen: no need to do execute two bus_to_phys translations in a row

2013-10-23 Thread Konrad Rzeszutek Wilk
On Thu, Oct 17, 2013 at 06:43:33PM +0100, Stefano Stabellini wrote: xen_unmap_single calls xen_bus_to_phys, then passes dev_addr to is_xen_swiotlb_buffer that calls xen_bus_to_phys again. It does? I see it call mfn_to_local_pfn which calls pfn_to_mfn and get_phys_to_machine (which I presume is

Re: [PATCH v8 0/19] enable swiotlb-xen on arm and arm64

2013-10-23 Thread Konrad Rzeszutek Wilk
On Thu, Oct 17, 2013 at 06:42:18PM +0100, Stefano Stabellini wrote: Hi all, this patch series enables xen-swiotlb on arm and arm64. It has been heavily reworked compared to the previous versions in order to achieve better performances and to address review comments. We are not using

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-23 Thread Konrad Rzeszutek Wilk
On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console

Re: [PATCH v8 13/19] swiotlb-xen: use xen_dma_map/unmap_page, xen_dma_sync_single_for_cpu/device

2013-10-23 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 06:20:25PM +0100, Stefano Stabellini wrote: On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote: On Thu, Oct 17, 2013 at 06:43:28PM +0100, Stefano Stabellini wrote: Call xen_dma_map_page, xen_dma_unmap_page, xen_dma_sync_single_for_cpu, xen_dma_sync_single_for_device

Re: [PATCH v8 18/19] swiotlb-xen: no need to do execute two bus_to_phys translations in a row

2013-10-23 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 06:34:13PM +0100, Stefano Stabellini wrote: On Thu, Oct 17, 2013 at 06:43:33PM +0100, Stefano Stabellini wrote: xen_unmap_single calls xen_bus_to_phys, then passes dev_addr to is_xen_swiotlb_buffer that calls xen_bus_to_phys again. It does? I see it call

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 11:08:01PM +0100, Julien Grall wrote: On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote

[v1 1/2] xen/p2m: Create identity mappings for PFNs beyound E820 and PCI BARs

2013-10-25 Thread Konrad Rzeszutek Wilk
...@oracle.com CC: David Vrabel david.vra...@citrix.com Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/balloon.c | 19 + drivers/xen/pci.c | 79 +-- include/xen/balloon.h | 1 + 3 files changed, 96 insertions(+), 3

[PATCH v1] Set 1-1 P2M for PCI BARs and MCFG regions - if needed.

2013-10-25 Thread Konrad Rzeszutek Wilk
areas. drivers/xen/balloon.c | 19 + drivers/xen/pci.c | 164 +++- include/xen/balloon.h | 1 + include/xen/interface/physdev.h | 11 +++ 4 files changed, 192 insertions(+), 3 deletions(-) Konrad Rzeszutek Wilk (2

[v1 2/2] xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved for MCFG areas and setup 1-1 P2M

2013-10-25 Thread Konrad Rzeszutek Wilk
santosh.j...@citrix.com CC: Jan Beulich jbeul...@suse.com CC: Boris Ostrovsky boris.ostrov...@oracle.com CC: David Vrabel david.vra...@citrix.com CC: Mukesh Rathor mukesh.rat...@oracle.com Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/pci.c | 153

Re: [v1 1/2] xen/p2m: Create identity mappings for PFNs beyound E820 and PCI BARs

2013-10-25 Thread Konrad Rzeszutek Wilk
On Fri, Oct 25, 2013 at 11:03:20AM -0400, Konrad Rzeszutek Wilk wrote: On bootup the E820 gaps or E820_RESV regions are marked as identity regions. Meaning that any lookup done in the P2M will return the same value: pfn_to_mfn(pfn) == pfn. This is needed for PCI devices so that drivers can

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-25 Thread Konrad Rzeszutek Wilk
On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: On Thu, 2013-10-24 at 17:30 +0100, Julien Grall wrote: I'm sure the solution move xen call earlier will come up in few mails, so there was a discussion for swiotlb few weeks ago (https://lkml.org/lkml/2013/8/29/609). And the

Re: [PATCH v8 13/19] swiotlb-xen: use xen_dma_map/unmap_page, xen_dma_sync_single_for_cpu/device

2013-10-25 Thread Konrad Rzeszutek Wilk
On Thu, Oct 24, 2013 at 11:44:50AM +0100, Stefano Stabellini wrote: On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote: On Wed, Oct 23, 2013 at 06:20:25PM +0100, Stefano Stabellini wrote: On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote: On Thu, Oct 17, 2013 at 06:43:28PM +0100, Stefano

Re: [PATCH v8 13/19] swiotlb-xen: use xen_dma_map/unmap_page, xen_dma_sync_single_for_cpu/device

2013-10-25 Thread Konrad Rzeszutek Wilk
On Thu, Oct 24, 2013 at 02:11:48PM +0100, Stefano Stabellini wrote: On Thu, 24 Oct 2013, Stefano Stabellini wrote: On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote: On Wed, Oct 23, 2013 at 06:20:25PM +0100, Stefano Stabellini wrote: On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote

Re: [Xen-devel] [PATCH v1] Set 1-1 P2M for PCI BARs and MCFG regions - if needed.

2013-10-25 Thread Konrad Rzeszutek Wilk
David Vrabel dvra...@cantab.net wrote: On 25/10/13 16:03, Konrad Rzeszutek Wilk wrote: 2). Assume that INVALID_P2M_ENTRY is considered 1-1. That would require auditing of the code and also making sure that any xen_privcmd_mmap calls use the m2p_add_override. I'm not sure I

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-28 Thread Konrad Rzeszutek Wilk
On Sat, Oct 26, 2013 at 09:27:08AM +0100, Ian Campbell wrote: On Fri, 2013-10-25 at 15:38 -0400, Konrad Rzeszutek Wilk wrote: On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: But stepping back how/why is this function called on x86 when not running under Xen? Wouldn't the use

Re: EFI and multiboot2 devlopment work for Xen

2013-10-28 Thread Konrad Rzeszutek Wilk
On Tue, Oct 22, 2013 at 10:54:44AM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 21.10.2013 23:16, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Mail is big, I think I got your essential points but I didn't read it whole. On 21.10.2013 14:57, Daniel Kiper wrote: Hi, During work

Re: [Xen-devel] [PATCH v1] Set 1-1 P2M for PCI BARs and MCFG regions - if needed.

2013-10-28 Thread Konrad Rzeszutek Wilk
On Fri, Oct 25, 2013 at 11:58:34PM +0100, David Vrabel wrote: On 25/10/13 16:03, Konrad Rzeszutek Wilk wrote: 2). Assume that INVALID_P2M_ENTRY is considered 1-1. That would require auditing of the code and also making sure that any xen_privcmd_mmap calls use the m2p_add_override

Re: [v1 1/2] xen/p2m: Create identity mappings for PFNs beyound E820 and PCI BARs

2013-10-28 Thread Konrad Rzeszutek Wilk
On Fri, Oct 25, 2013 at 04:08:19PM -0600, Bjorn Helgaas wrote: On Fri, Oct 25, 2013 at 9:03 AM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On bootup the E820 gaps or E820_RESV regions are marked as identity regions. Meaning that any lookup done in the P2M will return the same

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-10 Thread Konrad Rzeszutek Wilk
On Wed, May 08, 2013 at 04:18:24PM +0800, Zhenzhong Duan wrote: When driver load and unload in a loop, pirq will exhaust finally. Try to use the same pirq which was already mapped and binded at first time So what happens if I unload and reload two drivers in random order? when driver loaded.

[GIT PULL] (xen) stable/for-linus-3.10-rc0-tag-two

2013-05-10 Thread Konrad Rzeszutek Wilk
Rzeszutek Wilk (5): xen/vcpu/pvhvm: Fix vcpu hotplugging hanging. xen/vcpu: Document the xen_vcpu_info and xen_vcpu xen/smp/pvhvm: Don't point per_cpu(xen_vpcu, 33 and larger) to shared_info xen/spinlock: Fix check from greater than to be also be greater or equal to. Zhenzhong

Re: [PATCH v3] mm: remove compressed copy from zram in-memory

2013-05-10 Thread Konrad Rzeszutek Wilk
On Fri, May 10, 2013 at 4:44 AM, Minchan Kim minc...@kernel.org wrote: Hi Konrad, On Thu, May 09, 2013 at 04:15:42PM -0400, Konrad Rzeszutek Wilk wrote: On Thu, May 09, 2013 at 08:41:57AM +0900, Minchan Kim wrote: Hey Michan, ^-n It's a only thing I can know better than other

Re: [PATCH v3] xen-blkback: allocate list of pending reqs in small chunks

2013-05-13 Thread Konrad Rzeszutek Wilk
Reviewed-by: David Vrabel david.vra...@citrix.com Cc: David Vrabel david.vra...@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- Changes since v2: * Add Sander Tested-by. Changes since v1: * Remove stray pr_alert. --- drivers/block/xen-blkback/blkback.c | 92

Re: udev races with 'arch_register_cpu' to write 1 to /sys/devices/system/cpu/cpu1/online (which is not yet created)

2013-05-13 Thread Konrad Rzeszutek Wilk
On Fri, May 10, 2013 at 06:34:34PM +0200, Igor Mammedov wrote: On Mon, Apr 30, 2012 at 11:51:49AM -0400, Greg KH wrote: On Mon, Apr 30, 2012 at 11:50:18AM -0400, Greg KH wrote: On Mon, Apr 30, 2012 at 11:36:23AM -0400, Konrad Rzeszutek Wilk wrote: Hey Greg, Hoping you can help

Re: linux-next: comment on the xen-two tree

2013-05-13 Thread Konrad Rzeszutek Wilk
On Mon, May 13, 2013 at 09:52:44AM +1000, Stephen Rothwell wrote: Hi Konrad, Since the xen-two tree (git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git linux-next) seems to only consist of merges commits and some old (pre v3.9) stuff, it might be a good time to reset it to be just

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-13 Thread Konrad Rzeszutek Wilk
On Mon, May 13, 2013 at 12:06:43PM +0100, Stefano Stabellini wrote: On Fri, 10 May 2013, Konrad Rzeszutek Wilk wrote: On Wed, May 08, 2013 at 04:18:24PM +0800, Zhenzhong Duan wrote: When driver load and unload in a loop, pirq will exhaust finally. Try to use the same pirq which

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-13 Thread Konrad Rzeszutek Wilk
On Mon, May 13, 2013 at 03:50:52PM +0100, Stefano Stabellini wrote: On Mon, 13 May 2013, Konrad Rzeszutek Wilk wrote: On Mon, May 13, 2013 at 12:06:43PM +0100, Stefano Stabellini wrote: On Fri, 10 May 2013, Konrad Rzeszutek Wilk wrote: On Wed, May 08, 2013 at 04:18:24PM +0800, Zhenzhong

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-13 Thread Konrad Rzeszutek Wilk
On Mon, May 13, 2013 at 06:24:46PM +0100, Stefano Stabellini wrote: On Mon, 13 May 2013, Konrad Rzeszutek Wilk wrote: On Mon, May 13, 2013 at 03:50:52PM +0100, Stefano Stabellini wrote: On Mon, 13 May 2013, Konrad Rzeszutek Wilk wrote: On Mon, May 13, 2013 at 12:06:43PM +0100, Stefano

Re: [PATCH 1/2] cpu: fix crash_notes leak in register_cpu()

2013-05-14 Thread Konrad Rzeszutek Wilk
On Tue, May 14, 2013 at 12:05:31AM +0200, Igor Mammedov wrote: crash_notes is dinamically created with device_create_file() but ^^^-dynamically isn't anywhere deleted. Define crash_notes statically via attribute groups so that device_register would create it

Re: [PATCH 2/2] cpu: make sure that cpu/online file created before KOBJ_ADD is emitted

2013-05-14 Thread Konrad Rzeszutek Wilk
On Tue, May 14, 2013 at 12:05:32AM +0200, Igor Mammedov wrote: Fixes race between udev and hotplugged CPU registration, described at https://lkml.org/lkml/2012/4/30/198 It would be better if you copy-n-pasted the contents of that URL in here. by defining online attribute statically so that

Re: [RFC 0/2] cpu: fix leak and udev race in register_cpu()

2013-05-14 Thread Konrad Rzeszutek Wilk
it to kset instead of the one you did. It fixes it for me so Tested-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com and also (thought the git commit descriptions need a bit of work, but that is expected as an RFC patch): Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com 1. move

Re: [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-14 Thread Konrad Rzeszutek Wilk
On Tue, May 14, 2013 at 02:49:50PM +0100, Stefano Stabellini wrote: On Mon, 13 May 2013, Konrad Rzeszutek Wilk wrote: On Mon, May 13, 2013 at 06:24:46PM +0100, Stefano Stabellini wrote: On Mon, 13 May 2013, Konrad Rzeszutek Wilk wrote: On Mon, May 13, 2013 at 03:50:52PM +0100, Stefano

Re: [Xen-devel] [PATCH 3/3] x86/xen: sync the CMOS RTC as well as the Xen wallclock

2013-05-14 Thread Konrad Rzeszutek Wilk
-john Acked-by: Konrad Rzeszutek Wilk Or Reviewed-by. Or John if you would like I can carry this in my branch for Linus. Thought it might make sense to add the comment from Jan about the CMOS and the follow up explanation. -- Sent from my Android phone. Please excuse my brevity

[PATCH 5/9] xen/tmem: s/disable_// and change the logic.

2013-05-14 Thread Konrad Rzeszutek Wilk
The variety of disable_[cleancache|frontswap|selfshrinking] are making this a bit complex. Just remove the disable_ part and change the logic around for the nofrontswap and nocleancache parameters. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/tmem.c | 27

[PATCH 8/9] xen/tmem: Remove the usage of '[no|]selfballoon' and use 'tmem.selfballooning' bool instead.

2013-05-14 Thread Konrad Rzeszutek Wilk
As the 'tmem' driver is the one that actually sets whether it will use it (or not) so might as well make tmem responsible for this knob. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/Kconfig |5 ++--- drivers/xen/xen-selfballoon.c | 25

[PATCH 9/9] xen/tmem: Don't use self[ballooning|shrinking] if frontswap is off.

2013-05-14 Thread Konrad Rzeszutek Wilk
There is no point. We would just squeeze the guest to put more and more pages in the swap disk without any purpose. The only time it makes sense to use the selfballooning and shrinking is when frontswap is being utilized. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com

[PATCH 7/9] xen/tmem: Remove the usage of 'noselfshrink' and use 'tmem.selfshrink' bool instead.

2013-05-14 Thread Konrad Rzeszutek Wilk
As the 'tmem' driver is the one that actually sets whether it will use it or not so might as well make tmem responsible for this knob. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/Kconfig |2 +- drivers/xen/xen-selfballoon.c | 15 ++- 2

[PATCH] Fixes, cleanups, compile warning fixes, and documentation update for Xen tmem driver (v2).

2013-05-14 Thread Konrad Rzeszutek Wilk
| 47 ++ 4 files changed, 69 insertions(+), 93 deletions(-) (oh nice, more deletions!) Konrad Rzeszutek Wilk (9): xen/tmem: Cleanup. Remove the parts that say temporary. xen/tmem: Move all of the boot and module parameters to the top of the file. xen/tmem

[PATCH 1/9] xen/tmem: Cleanup. Remove the parts that say temporary.

2013-05-14 Thread Konrad Rzeszutek Wilk
Frontswap is upstream, not of having this #ifdef. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/tmem.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index e3600be..5686d6d 100644 --- a/drivers/xen

[PATCH 2/9] xen/tmem: Move all of the boot and module parameters to the top of the file.

2013-05-14 Thread Konrad Rzeszutek Wilk
Just code movement to see the different boot or module parameters. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/tmem.c | 85 +++ 1 files changed, 45 insertions(+), 40 deletions(-) diff --git a/drivers/xen/tmem.c b

[PATCH 6/9] xen/tmem: Remove the boot options and fold them in the tmem.X parameters.

2013-05-14 Thread Konrad Rzeszutek Wilk
and the patches: xen/tmem: Remove the usage of 'noselfshrink' and use 'tmem.selfshrink' bool instead. xen/tmem: Remove the usage of 'noselfballoon','selfballoon' and use 'tmem.selfballon' bool instead. removes them. Also add documentation. Signed-off-by: Konrad Rzeszutek Wilk konrad.w

[PATCH 4/9] xen/tmem: Fix compile warning.

2013-05-14 Thread Konrad Rzeszutek Wilk
Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/tmem.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index c2ee188..30bf974 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c @@ -61,14 +61,12 @@ __setup(nofrontswap

[PATCH 3/9] xen/tmem: Split out the different module/boot options.

2013-05-14 Thread Konrad Rzeszutek Wilk
There are three options - depending on what combination of CONFIG_FRONTSWAP, CONFIG_CLEANCACHE and CONFIG_XEN_SELFBALLOONING is used. Lets split them out nicely out in three groups to make it easier to clean up. Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/tmem.c

Re: [PATCHv11 3/4] zswap: add to mm/

2013-05-15 Thread Konrad Rzeszutek Wilk
Sorry, but I don't think that's appropriate for a patch in the MM subsystem. I am heading to the airport shortly so this email is a bit hastily typed. Perhaps a compromise can be reached where this code is merged as a driver not a core mm component. There is a high bar to be in the MM - it has

Re: [PATCHv11 3/4] zswap: add to mm/

2013-05-15 Thread Konrad Rzeszutek Wilk
Seth Jennings sjenn...@linux.vnet.ibm.com wrote: On Wed, May 15, 2013 at 02:55:06PM -0400, Konrad Rzeszutek Wilk wrote: Sorry, but I don't think that's appropriate for a patch in the MM subsystem. I am heading to the airport shortly so this email is a bit hastily typed. Perhaps

[GIT PULL] (xen) stable/for-linus-3.12-rc0-tag

2013-09-03 Thread Konrad Rzeszutek Wilk
: Remove unnecessary __GFP_ZERO from kzalloc Konrad Rzeszutek Wilk (5): xen: Support 64-bit PV guest receiving NMIs MAINTAINERS: Update the Xen subsystem's with proper mailing list. MAINTAINERS: Add in two extra co-maintainers of the Xen tree. MAINTAINERS: Remove Jeremy from

Re: [PATCH] tracing/events: Add bounce tracing to swiotbl-xen

2013-09-04 Thread Konrad Rzeszutek Wilk
On Wed, Sep 04, 2013 at 09:10:50PM +0100, Zoltan Kiss wrote: On 03/09/13 13:42, Konrad Rzeszutek Wilk wrote: Correct. The double buffering code is being run in lib/swiotlb.c not the xen-swiotlb.c. Hence the question of why not move the tracing in there. I've put the trace to both locations

Re: [PATCH] net/core: Order-3 frag allocator causes SWIOTLB bouncing under Xen

2013-09-04 Thread Konrad Rzeszutek Wilk
On Wed, Sep 04, 2013 at 02:00:40PM -0700, Eric Dumazet wrote: On Wed, 2013-09-04 at 21:47 +0100, Zoltan Kiss wrote: THIS PATCH IS NOT INTENDED TO BE UPSTREAMED, IT HAS ONLY INFORMING PURPOSES! I've noticed a performance regression with upstream kernels when used as Dom0 under Xen. The

Re: [PATCH] DRM: TTM: Fix memory leak issue in ttm_agp_tt_create().

2013-09-06 Thread Konrad Rzeszutek Wilk
airl...@redhat.com Cc: dri-de...@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/gpu/drm/ttm/ttm_agp_backend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers

Re: [Xen-devel] [PATCH] net/core: Order-3 frag allocator causes SWIOTLB bouncing under Xen

2013-09-06 Thread Konrad Rzeszutek Wilk
On Thu, Sep 05, 2013 at 08:39:06AM +0100, Ian Campbell wrote: On Wed, 2013-09-04 at 17:11 -0400, Konrad Rzeszutek Wilk wrote: On Wed, Sep 04, 2013 at 02:00:40PM -0700, Eric Dumazet wrote: Maybe you could add proper infrastructure to deal with Xen limitations. I think Ian posted

Re: [PATCH] xen/blkback: fix reference counting

2013-09-06 Thread Konrad Rzeszutek Wilk
allowing OP_DISCARD). Cc: sta...@vger.kernel.org Cc: Jan Beulich jbeul...@suse.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Thank you for spotting that. Let me stick it on my for-jens queue. Signed-off-by: Vegard Nossum vegard.nos...@oracle.com --- drivers/block/xen-blkback/blkback.c

[PATCH] xen/p2m: Export set_phys_to_machine.

2013-09-06 Thread Konrad Rzeszutek Wilk
We have already exported 'get_phys_to_machine' and there are third-party drivers that depend on this other symbol. As such lets make this balanced and also export this symbol. Reported-by: Yuval Shaia yuval.sh...@oracle.com Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86

Re: [PATCH v5 12/13] swiotlb-xen: use xen_alloc/free_coherent_pages

2013-09-06 Thread Konrad Rzeszutek Wilk
On Thu, Sep 05, 2013 at 05:50:45PM +0100, Stefano Stabellini wrote: On Fri, 30 Aug 2013, Konrad Rzeszutek Wilk wrote: On Thu, Aug 29, 2013 at 07:32:33PM +0100, Stefano Stabellini wrote: Use xen_alloc_coherent_pages and xen_free_coherent_pages to allocate or free coherent pages. We

<    9   10   11   12   13   14   15   16   17   18   >