Displaying 20 results from an estimated 46 matches for "arbitrary_virt_to_machine".
2008 May 15
0
[PATCH] linux/x86: utilize lookup_address() for virt_to_ptep()
...-#define virt_to_ptep(__va) \
-({ \
- pgd_t *__pgd = pgd_offset_k((unsigned long)(__va)); \
- pud_t *__pud = pud_offset(__pgd, (unsigned long)(__va)); \
- pmd_t *__pmd = pmd_offset(__pud, (unsigned long)(__va)); \
- pte_offset_kernel(__pmd, (unsigned long)(__va)); \
-})
-
-#define arbitrary_virt_to_machine(__va) \
-({ \
- maddr_t m = (maddr_t)pte_mfn(*virt_to_ptep(__va)) << PAGE_SHIFT;\
- m | ((unsigned long)(__va) & (PAGE_SIZE-1)); \
-})
+#define virt_to_ptep(va) \
+({ \
+ pte_t *__ptep = lookup_address((unsigned long)(va)); \
+ BUG_ON(!__ptep || !pte_present(*_...
2007 Apr 18
1
Descriptor table patches integrated
...sending out the patches shortly after testing with my (still in
progress!) Linux LDT test suite.
First interface quirk came up. It looks like Xen wants to return errors
from hypercalls:
+static inline int install_ldt_entry (__u32 *lp, __u32 entry_1, __u32 entry_2)
+{
+ unsigned long mach_lp = arbitrary_virt_to_machine(lp);
+
+ return HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
+}
While this is fine here, this could be problematic in terms of forcing
error checking in lots of situations where there used to be no error
checking in regular Linux - i.e. GDT updates which fail really are fatal
to the...
2007 Apr 18
1
Descriptor table patches integrated
...sending out the patches shortly after testing with my (still in
progress!) Linux LDT test suite.
First interface quirk came up. It looks like Xen wants to return errors
from hypercalls:
+static inline int install_ldt_entry (__u32 *lp, __u32 entry_1, __u32 entry_2)
+{
+ unsigned long mach_lp = arbitrary_virt_to_machine(lp);
+
+ return HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
+}
While this is fine here, this could be problematic in terms of forcing
error checking in lots of situations where there used to be no error
checking in regular Linux - i.e. GDT updates which fail really are fatal
to the...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...uct xenbus_device *dev,
if (!node)
return -ENOMEM;
- area = alloc_vm_area(PAGE_SIZE, &pte);
+ area = alloc_vm_area(PAGE_SIZE * nr_grefs, pte);
if (!area) {
kfree(node);
return -ENOMEM;
}
- op.host_addr = arbitrary_virt_to_machine(pte).maddr;
+ for (i = 0; i < nr_grefs; i++) {
+ op[i].flags = GNTMAP_host_map | GNTMAP_contains_pte,
+ op[i].ref = gnt_ref[i],
+ op[i].dom = dev->otherend_id,
+ op[i].host_addr = arbitrary_virt_to_machine(pte[i]).maddr;
+...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...uct xenbus_device *dev,
if (!node)
return -ENOMEM;
- area = alloc_vm_area(PAGE_SIZE, &pte);
+ area = alloc_vm_area(PAGE_SIZE * nr_grefs, pte);
if (!area) {
kfree(node);
return -ENOMEM;
}
- op.host_addr = arbitrary_virt_to_machine(pte).maddr;
+ for (i = 0; i < nr_grefs; i++) {
+ op[i].flags = GNTMAP_host_map | GNTMAP_contains_pte,
+ op[i].ref = gnt_ref[i],
+ op[i].dom = dev->otherend_id,
+ op[i].host_addr = arbitrary_virt_to_machine(pte[i]).maddr;
+...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...uct xenbus_device *dev,
if (!node)
return -ENOMEM;
- area = alloc_vm_area(PAGE_SIZE, &pte);
+ area = alloc_vm_area(PAGE_SIZE * nr_grefs, pte);
if (!area) {
kfree(node);
return -ENOMEM;
}
- op.host_addr = arbitrary_virt_to_machine(pte).maddr;
+ for (i = 0; i < nr_grefs; i++) {
+ op[i].flags = GNTMAP_host_map | GNTMAP_contains_pte,
+ op[i].ref = gnt_ref[i],
+ op[i].dom = dev->otherend_id,
+ op[i].host_addr = arbitrary_virt_to_machine(pte[i]).maddr;
+...
2007 Apr 18
0
[PATCH 12/12] xen-ldt
...pinned(struct mm_struct *mm)
+{
+ if (!mm->context.pinned) {
+ spin_lock(&mm_unpinned_lock);
+ list_del(&mm->context.unpinned);
+ spin_unlock(&mm_unpinned_lock);
+ }
+}
+
+static inline int install_ldt_entry (__u32 *lp, __u32 entry_1, __u32 entry_2)
+{
+ unsigned long mach_lp = arbitrary_virt_to_machine(lp);
+
+ return HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
+}
+
+#endif /* __ASM_HYPERVISOR_HOOKS_H */
2007 Apr 18
0
[PATCH 12/12] xen-ldt
...pinned(struct mm_struct *mm)
+{
+ if (!mm->context.pinned) {
+ spin_lock(&mm_unpinned_lock);
+ list_del(&mm->context.unpinned);
+ spin_unlock(&mm_unpinned_lock);
+ }
+}
+
+static inline int install_ldt_entry (__u32 *lp, __u32 entry_1, __u32 entry_2)
+{
+ unsigned long mach_lp = arbitrary_virt_to_machine(lp);
+
+ return HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
+}
+
+#endif /* __ASM_HYPERVISOR_HOOKS_H */
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
...00000 -0700
+++ linux-2.6.13/include/asm-i386/mach-xen/mach_desc.h 2005-08-08 21:19:43.000000000 -0700
@@ -0,0 +1,11 @@
+#ifndef __MACH_DESC_H
+#define __MACH_DESC_H
+
+static inline void write_ldt_entry (struct desc_struct *ldt, int entry, __u32 entry_1, __u32 entry_2)
+{
+ unsigned long mach_lp = arbitrary_virt_to_machine(&ldt[entry]);
+
+ return HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
+}
+
+#endif
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
...00000 -0700
+++ linux-2.6.13/include/asm-i386/mach-xen/mach_desc.h 2005-08-08 21:19:43.000000000 -0700
@@ -0,0 +1,11 @@
+#ifndef __MACH_DESC_H
+#define __MACH_DESC_H
+
+static inline void write_ldt_entry (struct desc_struct *ldt, int entry, __u32 entry_1, __u32 entry_2)
+{
+ unsigned long mach_lp = arbitrary_virt_to_machine(&ldt[entry]);
+
+ return HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
+}
+
+#endif
2011 Jul 21
51
Linux Stubdom Problem
2011/7/19 Stefano Stabellini <stefano.stabellini@eu.citrix.com>:
> CC''ing Tim and xen-devel
>
> On Mon, 18 Jul 2011, Jiageng Yu wrote:
>> 2011/7/16 Stefano Stabellini <stefano.stabellini@eu.citrix.com>:
>> > On Fri, 15 Jul 2011, Jiageng Yu wrote:
>> >> 2011/7/15 Jiageng Yu <yujiageng734@gmail.com>:
>> >> > 2011/7/15
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy.
According to your suggestion, I recreated patches for Ingo's x86.git tree.
And this patch series includes Eddie's modification.
Please review and forward them. (or push back to respin.)
Recently the xen-ia64 community started to make efforts to merge
xen/ia64 Linux to upstream. The first step is to merge up domU portion.
This patchset is preliminary for xen/ia64 domU linux
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy.
According to your suggestion, I recreated patches for Ingo's x86.git tree.
And this patch series includes Eddie's modification.
Please review and forward them. (or push back to respin.)
Recently the xen-ia64 community started to make efforts to merge
xen/ia64 Linux to upstream. The first step is to merge up domU portion.
This patchset is preliminary for xen/ia64 domU linux
2007 Apr 23
27
[PATCH 00/25] xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface.
It applies to 2.6.21-rc7 + your patches + the last batch of pv_ops
patches I posted.
This patch generally restricts itself to Xen-specific parts of the tree,
though it does make a few small changes elsewhere.
These patches include:
- some helper routines for allocating address space and walking pagetables
- Xen
2007 Apr 23
27
[PATCH 00/25] xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface.
It applies to 2.6.21-rc7 + your patches + the last batch of pv_ops
patches I posted.
This patch generally restricts itself to Xen-specific parts of the tree,
though it does make a few small changes elsewhere.
These patches include:
- some helper routines for allocating address space and walking pagetables
- Xen
2007 May 11
30
[patch 00/28]xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface. It
applies to 2.6.21-git13 + patches-2.6.21-git7-070507-1.tar.gz (I think
"unwinder" is the only patch which doesn't apply to git13, and the
sched-clock patches are the only ones which this series actually
needs).
Changes since the last posting:
- More netfront review and cleanup
- Added ability to
2007 May 11
30
[patch 00/28]xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface. It
applies to 2.6.21-git13 + patches-2.6.21-git7-070507-1.tar.gz (I think
"unwinder" is the only patch which doesn't apply to git13, and the
sched-clock patches are the only ones which this series actually
needs).
Changes since the last posting:
- More netfront review and cleanup
- Added ability to
2007 May 11
30
[patch 00/28]xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface. It
applies to 2.6.21-git13 + patches-2.6.21-git7-070507-1.tar.gz (I think
"unwinder" is the only patch which doesn't apply to git13, and the
sched-clock patches are the only ones which this series actually
needs).
Changes since the last posting:
- More netfront review and cleanup
- Added ability to
2007 May 22
35
[patch 00/33] xen: Xen paravirt_ops implementation
Hi,
This is the Xen implementation for the paravirt_ops interface. The
series is based on 2.6.22-rc1-mm1, and I think its ready to be cooked
in -mm with a view to being merged in 2.6.23.
The first part of the series is some small changes to the core kernel.
Apart from the new code added in "Allocate and free vmalloc areas"
(posted many times before), they are simply a few one-liners
2007 May 22
35
[patch 00/33] xen: Xen paravirt_ops implementation
Hi,
This is the Xen implementation for the paravirt_ops interface. The
series is based on 2.6.22-rc1-mm1, and I think its ready to be cooked
in -mm with a view to being merged in 2.6.23.
The first part of the series is some small changes to the core kernel.
Apart from the new code added in "Allocate and free vmalloc areas"
(posted many times before), they are simply a few one-liners