search for: virt_to_bus

Displaying 20 results from an estimated 34 matches for "virt_to_bus".

2005 Oct 04
2
Question regarding behavior of virt_to_bus ....
...I need some large chunk of physical memory, so I allocate it early using alloc_bootmem_low_pages and use it later (akin to bigphysarea patch). The trouble I am having is the following. Suppose the virtual address for the memory area is 0xc14d6000. After xen_create_contiguous_region call, I do a virt_to_bus and the bus address comes out to be 0x18000000. So far so good. However, later when I try to use this memory in a device driver, the call to virt_to_bus returns 0x14d6000. This result is baffling me, since that''s what it would look like in a normal 32-bit i386 world, and not in xenifie...
2006 Jan 16
13
Support for AGP aperture as IOMMU in AMD64 mode [2/2]
..._to_gart(virt_to_phys(x))) +#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x))) +#include <asm-xen/asm-i386/agp.h> + int no_iommu; static int no_agp; #ifdef CONFIG_IOMMU_DEBUG @@ -416,7 +422,7 @@ if (!dev) dev = &fallback_dev; - phys_mem = virt_to_phys(addr); + phys_mem = virt_to_bus(addr); if (!need_iommu(dev, phys_mem, size)) return phys_mem; @@ -721,6 +727,7 @@ unsigned aper_size, gatt_size, new_aper_size; printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); + aper_size = aper_base = info->aper_size = 0; for_all_nb(dev) { new_aper_base = read_ap...
2007 Apr 18
1
(no subject)
Sender: ak@brahms.suse.de To: Adrian Bunk <bunk@stusta.de> Cc: linux-kernel@vger.kernel.org, virtualization@lists.osdl.org Subject: Re: [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 References: <20051118014055.GK11494@stusta.de> From: Andi Kleen <ak@suse.de> Date: 18 Nov 2005 17:05:07 +0100 In-Reply-To: <20051118014055.GK11494@stusta.de> Message-ID: <p73lkzmhrgs.fsf@brahms.suse.de> Lines: 17 User-Agent: Gnus/5.09 (Gnu...
2007 Apr 18
1
(no subject)
Sender: ak@brahms.suse.de To: Adrian Bunk <bunk@stusta.de> Cc: linux-kernel@vger.kernel.org, virtualization@lists.osdl.org Subject: Re: [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 References: <20051118014055.GK11494@stusta.de> From: Andi Kleen <ak@suse.de> Date: 18 Nov 2005 17:05:07 +0100 In-Reply-To: <20051118014055.GK11494@stusta.de> Message-ID: <p73lkzmhrgs.fsf@brahms.suse.de> Lines: 17 User-Agent: Gnus/5.09 (Gnu...
2007 Jul 13
1
NV43 + PPC64 = :(
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've been trying to get nouveau working on a Geforce 6600LE in a dual-core G5 PowerMac system. For various reasons, it's not working. The first problem I encountered was the lack of virt_to_bus on 64-bit PPC. After talking to benh on IRC, I created the attached patch. nouveau.ko can at least load on PPC64 now. :) However, during X-server start up, the system hard-locks. Since Apple systems don't have a reset button (sigh...), I have to power-cycle the machine. I cannot ssh into th...
2007 Apr 03
2
linux: GFP_DMA/GFP_DMA32
While I have a patch queued to address related issues in intel-agp, a quick scan of the Linux tree seems to reveal several more cases where assumptions are being made on GFP_DMA{,32} allocations - either the result (even properly passed through virt_to_bus()) is put into hardware registers (with no guarantee that it fits the width required by those registers or fields thereof), or page-crossing arithmetic is being done (explicitly or implicitly). All this is set to cause data corruption. Are there any ideas, other than either suppressing such compon...
2019 May 08
2
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...390/Kconfig > +++ b/arch/s390/Kconfig > @@ -1,4 +1,7 @@ > # SPDX-License-Identifier: GPL-2.0 > +config ARCH_HAS_MEM_ENCRYPT > + def_bool y > + > config MMU > def_bool y > > @@ -191,6 +194,7 @@ config S390 > select ARCH_HAS_SCALED_CPUTIME > select VIRT_TO_BUS > select HAVE_NMI > + select SWIOTLB > > > config SCHED_OMIT_FRAME_POINTER > diff --git a/arch/s390/include/asm/mem_encrypt.h > b/arch/s390/include/asm/mem_encrypt.h new file mode 100644 > index 000000000000..0898c09a888c > --- /dev/null > +++ b/arch/s390/includ...
2019 May 08
2
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...390/Kconfig > +++ b/arch/s390/Kconfig > @@ -1,4 +1,7 @@ > # SPDX-License-Identifier: GPL-2.0 > +config ARCH_HAS_MEM_ENCRYPT > + def_bool y > + > config MMU > def_bool y > > @@ -191,6 +194,7 @@ config S390 > select ARCH_HAS_SCALED_CPUTIME > select VIRT_TO_BUS > select HAVE_NMI > + select SWIOTLB > > > config SCHED_OMIT_FRAME_POINTER > diff --git a/arch/s390/include/asm/mem_encrypt.h > b/arch/s390/include/asm/mem_encrypt.h new file mode 100644 > index 000000000000..0898c09a888c > --- /dev/null > +++ b/arch/s390/includ...
2019 Apr 26
0
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...Kconfig index 1c3fcf19c3af..5500d05d4d53 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -1,4 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 +config ARCH_HAS_MEM_ENCRYPT + def_bool y + config MMU def_bool y @@ -191,6 +194,7 @@ config S390 select ARCH_HAS_SCALED_CPUTIME select VIRT_TO_BUS select HAVE_NMI + select SWIOTLB config SCHED_OMIT_FRAME_POINTER diff --git a/arch/s390/include/asm/mem_encrypt.h b/arch/s390/include/asm/mem_encrypt.h new file mode 100644 index 000000000000..0898c09a888c --- /dev/null +++ b/arch/s390/include/asm/mem_encrypt.h @@ -0,0 +1,18 @@ +/* SPDX-Lice...
2004 Nov 05
7
Lockup at boot with nFroce SATA
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, Is the sata_nv (based on SCSI) driver supposed to work with Xen? When I tried to boot my dom0 kernel recompiled with the sata_nv drivers enabled my kernel locks up, I guess when probing the first drive connected via S-ATA. ("Screenshot" here: <URL:http://mjh.name/xen.lock.1.jpg>) (Kernel also says that partition tables of the
2008 Nov 13
69
[PATCH 00 of 38] xen: add more Xen dom0 support
Hi Ingo, Here''s the chunk of patches to add Xen Dom0 support (it''s probably worth creating a new xen/dom0 topic branch for it). A dom0 Xen domain is basically the same as a normal domU domain, but it has extra privileges to directly access hardware. There are two issues to deal with: - translating to and from the domain''s pseudo-physical addresses and real machine
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...v; + dev = dev->parent ? dev->parent : dev; + return dma_alloc_coherent(dev, size, dma_handle, flag); + } +#endif + return kzalloc(size, flag); +} + +static inline void +free_databuf(struct virtio_device *vdev, size_t size, void *cpu_addr) +{ +#ifdef CONFIG_HAS_DMA + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } +#endif + kfree(c...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...v; + dev = dev->parent ? dev->parent : dev; + return dma_alloc_coherent(dev, size, dma_handle, flag); + } +#endif + return kzalloc(size, flag); +} + +static inline void +free_databuf(struct virtio_device *vdev, size_t size, void *cpu_addr) +{ +#ifdef CONFIG_HAS_DMA + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } +#endif + kfree(c...
2019 May 09
0
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...1,4 +1,7 @@ > > # SPDX-License-Identifier: GPL-2.0 > > +config ARCH_HAS_MEM_ENCRYPT > > + def_bool y > > + > > config MMU > > def_bool y > > > > @@ -191,6 +194,7 @@ config S390 > > select ARCH_HAS_SCALED_CPUTIME > > select VIRT_TO_BUS > > select HAVE_NMI > > + select SWIOTLB > > > > > > config SCHED_OMIT_FRAME_POINTER > > diff --git a/arch/s390/include/asm/mem_encrypt.h > > b/arch/s390/include/asm/mem_encrypt.h new file mode 100644 > > index 000000000000..0898c09a888c > &...
2019 May 09
0
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...ig > +++ b/arch/s390/Kconfig > @@ -1,4 +1,7 @@ > ?# SPDX-License-Identifier: GPL-2.0 > +config ARCH_HAS_MEM_ENCRYPT > +??????? def_bool y > + > ?config MMU > ???? def_bool y > ?@@ -191,6 +194,7 @@ config S390 > ???? select ARCH_HAS_SCALED_CPUTIME > ???? select VIRT_TO_BUS > ???? select HAVE_NMI > +??? select SWIOTLB > ?? config SCHED_OMIT_FRAME_POINTER > diff --git a/arch/s390/include/asm/mem_encrypt.h b/arch/s390/include/asm/mem_encrypt.h > new file mode 100644 > index 000000000000..0898c09a888c > --- /dev/null > +++ b/arch/s390/include/as...
2019 Apr 09
0
[RFC PATCH 04/12] s390/cio: introduce cio DMA pool
...+++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 61 insertions(+) > > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index 46c69283a67b..e8099ab47368 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -194,6 +194,7 @@ config S390 > select VIRT_TO_BUS > select HAVE_NMI > select SWIOTLB > + select GENERIC_ALLOCATOR > > > config SCHED_OMIT_FRAME_POINTER > diff --git a/arch/s390/include/asm/cio.h b/arch/s390/include/asm/cio.h > index 1727180e8ca1..4510e418614a 100644 > --- a/arch/s390/include/asm/cio.h > +++ b...
2019 Apr 26
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...+ drivers/s390/cio/css.c | 101 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 5500d05d4d53..5861311d95d9 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -195,6 +195,7 @@ config S390 select VIRT_TO_BUS select HAVE_NMI select SWIOTLB + select GENERIC_ALLOCATOR config SCHED_OMIT_FRAME_POINTER diff --git a/arch/s390/include/asm/cio.h b/arch/s390/include/asm/cio.h index 1727180e8ca1..43c007d2775a 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h @@ -328,6 +328,17 @@...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...g); + } + return kzalloc(size, flag); +} + +static inline void +free_databuf(struct virtio_device *vdev, size_t size, void *cpu_addr) +{ + if (VIRTIO_CONSOLE_HAS_DMA && + virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + dma_addr_t dma = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma); + return; + } + kfree(cpu_addr); +} + +static void +free_buf(struct virtqueue *vq, struct port_buffer *buf, size_t buf_size) { - kfree(buf-&gt...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...g); + } + return kzalloc(size, flag); +} + +static inline void +free_databuf(struct virtio_device *vdev, size_t size, void *cpu_addr) +{ + if (VIRTIO_CONSOLE_HAS_DMA && + virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + dma_addr_t dma = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma); + return; + } + kfree(cpu_addr); +} + +static void +free_buf(struct virtqueue *vq, struct port_buffer *buf, size_t buf_size) { - kfree(buf-&gt...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...: dev; + return dma_alloc_coherent(dev, size, &dma, flag); + } + return kmalloc(size, flag); +} + +static inline void +free_databuf(struct virtio_device *vdev, size_t size, void *cpu_addr) +{ + + if (is_rproc_serial(vdev)) { + struct device *dev = &vdev->dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ stat...