search for: paravirt_lazy_mode

Displaying 20 results from an estimated 85 matches for "paravirt_lazy_mode".

2007 Oct 01
2
[PATCH RFC] paravirt: cleanup lazy mode handling
...7 files changed, 137 insertions(+), 104 deletions(-) =================================================================== --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -265,6 +265,69 @@ int paravirt_disable_iospace(void) } return ret; +} + +static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LAZY_NONE; + +static void enter_lazy(enum paravirt_lazy_mode mode, struct pv_lazy_ops *ops) +{ + BUG_ON(x86_read_percpu(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE); + BUG_ON(preemptible()); + + x86_write_percpu(paravirt_lazy_mode, mode); + (*ops->enter)(); +} + +st...
2007 Oct 01
2
[PATCH RFC] paravirt: cleanup lazy mode handling
...7 files changed, 137 insertions(+), 104 deletions(-) =================================================================== --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -265,6 +265,69 @@ int paravirt_disable_iospace(void) } return ret; +} + +static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LAZY_NONE; + +static void enter_lazy(enum paravirt_lazy_mode mode, struct pv_lazy_ops *ops) +{ + BUG_ON(x86_read_percpu(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE); + BUG_ON(preemptible()); + + x86_write_percpu(paravirt_lazy_mode, mode); + (*ops->enter)(); +} + +st...
2007 Oct 09
0
[PATCH RFC REPOST 2/2] paravirt: clean up lazy mode handling
...7 files changed, 128 insertions(+), 82 deletions(-) =================================================================== --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -265,6 +265,49 @@ int paravirt_disable_iospace(void) } return ret; +} + +static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LAZY_NONE; + +static inline void enter_lazy(enum paravirt_lazy_mode mode) +{ + BUG_ON(x86_read_percpu(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE); + BUG_ON(preemptible()); + + x86_write_percpu(paravirt_lazy_mode, mode); +} + +void paravirt_leave_lazy(enum paravirt_laz...
2007 Oct 09
0
[PATCH RFC REPOST 2/2] paravirt: clean up lazy mode handling
...7 files changed, 128 insertions(+), 82 deletions(-) =================================================================== --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -265,6 +265,49 @@ int paravirt_disable_iospace(void) } return ret; +} + +static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LAZY_NONE; + +static inline void enter_lazy(enum paravirt_lazy_mode mode) +{ + BUG_ON(x86_read_percpu(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE); + BUG_ON(preemptible()); + + x86_write_percpu(paravirt_lazy_mode, mode); +} + +void paravirt_leave_lazy(enum paravirt_laz...
2012 Apr 10
7
[PATCH v3 1/2] xen: enter/exit lazy_mmu_mode around m2p_override calls
...erride: about 6% using the gntdev device. Each m2p_add/remove_override call issues a MULTI_grant_table_op and a __flush_tlb_single if kmap_op != NULL. Batching all the calls together is a great performance benefit because it means issuing one hypercall total rather than two hypercall per page. If paravirt_lazy_mode is set PARAVIRT_LAZY_MMU, all these calls are going to be batched together, otherwise they are issued one at a time. Adding arch_enter_lazy_mmu_mode/arch_leave_lazy_mmu_mode around the m2p_add/remove_override calls forces paravirt_lazy_mode to PARAVIRT_LAZY_MMU, therefore makes sure that they are...
2007 Dec 20
6
[PATCH 0/15] adjust pvops to accomodate its x86_64 variant
Hi folks, With this series, the bulk of the work of pvops64 is done. Here, I integrate most of the paravirt.c and paravirt.h files, making them applicable to both architectures. CONFIG_PARAVIRT is _not_ present yet. Basically, this code is missing page table integration (patches currently being worked on by Jeremy). Enjoy
2007 Dec 20
6
[PATCH 0/15] adjust pvops to accomodate its x86_64 variant
Hi folks, With this series, the bulk of the work of pvops64 is done. Here, I integrate most of the paravirt.c and paravirt.h files, making them applicable to both architectures. CONFIG_PARAVIRT is _not_ present yet. Basically, this code is missing page table integration (patches currently being worked on by Jeremy). Enjoy
2007 Apr 29
1
[PATCH 1/2] lguest: fix up after pda->percpu conversion
Andrew Morton commented out some stuff to make lguest compile. This should actually make it work (in the latest -mm). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/lguest/lguest.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) =================================================================== --- a/drivers/lguest/lguest.c +++
2007 Apr 29
1
[PATCH 1/2] lguest: fix up after pda->percpu conversion
Andrew Morton commented out some stuff to make lguest compile. This should actually make it work (in the latest -mm). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/lguest/lguest.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) =================================================================== --- a/drivers/lguest/lguest.c +++
2017 May 19
0
[PATCH 02/10] paravirt: remove unused function paravirt_disable_iospace()
.... This is a fairly - * brute-force approach to disabling all non-virtual drivers. - * - * Note that this must be called very early to have any effect. - */ -int paravirt_disable_iospace(void) -{ - return request_resource(&ioport_resource, &reserve_ioports); -} - static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LAZY_NONE; static inline void enter_lazy(enum paravirt_lazy_mode mode) -- 2.12.0
2007 May 31
1
[PATCH 1/3] lguest: speed up PARAVIRT_LAZY_FLUSH handling
...for two PTE updates: 2269 (2261 - 2272) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 077496256739 drivers/lguest/lguest.c --- a/drivers/lguest/lguest.c Thu May 31 16:34:17 2007 +1000 +++ b/drivers/lguest/lguest.c Thu May 31 16:36:23 2007 +1000 @@ -58,9 +58,10 @@ static enum paravirt_lazy_mode lazy_mode static enum paravirt_lazy_mode lazy_mode; static void lguest_lazy_mode(enum paravirt_lazy_mode mode) { - if (mode == PARAVIRT_LAZY_FLUSH) - hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); - else { + if (mode == PARAVIRT_LAZY_FLUSH) { + if (unlikely(lazy_mode != PARAVIRT_LAZY_NONE)) + hcall(LHC...
2007 May 31
1
[PATCH 1/3] lguest: speed up PARAVIRT_LAZY_FLUSH handling
...for two PTE updates: 2269 (2261 - 2272) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 077496256739 drivers/lguest/lguest.c --- a/drivers/lguest/lguest.c Thu May 31 16:34:17 2007 +1000 +++ b/drivers/lguest/lguest.c Thu May 31 16:36:23 2007 +1000 @@ -58,9 +58,10 @@ static enum paravirt_lazy_mode lazy_mode static enum paravirt_lazy_mode lazy_mode; static void lguest_lazy_mode(enum paravirt_lazy_mode mode) { - if (mode == PARAVIRT_LAZY_FLUSH) - hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); - else { + if (mode == PARAVIRT_LAZY_FLUSH) { + if (unlikely(lazy_mode != PARAVIRT_LAZY_NONE)) + hcall(LHC...
2007 Oct 15
13
[PATCH 00/12] xen/paravirt_ops patches for 2.6.24
Hi Linus, Here's a set of patches to update paravirt_ops and Xen for 2.6.24 A quick overview of the patchset: paravirt_ops: Remove the monolithic paravirt_ops structure, and replace it with smaller structures of related functions. Also, clean up the handling of lazy mode to make it easier to implement. x86/mm/init.c: remove a chunk of dead code Xen: - remove duplicate includes -
2007 Oct 15
13
[PATCH 00/12] xen/paravirt_ops patches for 2.6.24
Hi Linus, Here's a set of patches to update paravirt_ops and Xen for 2.6.24 A quick overview of the patchset: paravirt_ops: Remove the monolithic paravirt_ops structure, and replace it with smaller structures of related functions. Also, clean up the handling of lazy mode to make it easier to implement. x86/mm/init.c: remove a chunk of dead code Xen: - remove duplicate includes -
2007 Oct 15
13
[PATCH 00/12] xen/paravirt_ops patches for 2.6.24
Hi Linus, Here's a set of patches to update paravirt_ops and Xen for 2.6.24 A quick overview of the patchset: paravirt_ops: Remove the monolithic paravirt_ops structure, and replace it with smaller structures of related functions. Also, clean up the handling of lazy mode to make it easier to implement. x86/mm/init.c: remove a chunk of dead code Xen: - remove duplicate includes -
2017 May 19
13
[PATCH 00/10] paravirt: make amount of paravirtualization configurable
Today paravirtualization is a all-or-nothing game: either a kernel is compiled with no paravirtualization support at all, or it is supporting paravirtualized environments like Xen pv-guests or lguest additionally to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen HVM-guests. As support of pv-guests requires quite intrusive pv-hooks (e.g. all access functions to page table entries,
2017 May 19
13
[PATCH 00/10] paravirt: make amount of paravirtualization configurable
Today paravirtualization is a all-or-nothing game: either a kernel is compiled with no paravirtualization support at all, or it is supporting paravirtualized environments like Xen pv-guests or lguest additionally to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen HVM-guests. As support of pv-guests requires quite intrusive pv-hooks (e.g. all access functions to page table entries,
2007 Apr 18
0
[PATCH 7/10] Resurrect the VMI lazy mode fixes.
...007 -0700 @@ -69,6 +69,7 @@ static struct { void (*flush_tlb)(int); void (*set_initial_ap_state)(int, int); void (*halt)(void); + void (*set_lazy_mode)(int mode); } vmi_ops; /* @@ -545,6 +546,26 @@ vmi_startup_ipi_hook(int phys_apicid, un } #endif +static void vmi_set_lazy_mode(enum paravirt_lazy_mode mode) +{ + static DEFINE_PER_CPU(int, lazy_mode); + + if (!vmi_ops.set_lazy_mode) + return; + + /* Modes should never nest or overlap */ + BUG_ON(__get_cpu_var(lazy_mode) && !(mode == PARAVIRT_LAZY_NONE || + mode == PARAVIRT_LAZY_FLUSH)); + + if (mode == PARAVIRT_LAZY_FLUSH) { +...
2007 Apr 18
0
[PATCH 7/10] Resurrect the VMI lazy mode fixes.
...007 -0700 @@ -69,6 +69,7 @@ static struct { void (*flush_tlb)(int); void (*set_initial_ap_state)(int, int); void (*halt)(void); + void (*set_lazy_mode)(int mode); } vmi_ops; /* @@ -545,6 +546,26 @@ vmi_startup_ipi_hook(int phys_apicid, un } #endif +static void vmi_set_lazy_mode(enum paravirt_lazy_mode mode) +{ + static DEFINE_PER_CPU(int, lazy_mode); + + if (!vmi_ops.set_lazy_mode) + return; + + /* Modes should never nest or overlap */ + BUG_ON(__get_cpu_var(lazy_mode) && !(mode == PARAVIRT_LAZY_NONE || + mode == PARAVIRT_LAZY_FLUSH)); + + if (mode == PARAVIRT_LAZY_FLUSH) { +...
2007 Nov 15
0
[patch 12/19] xen: deal with stale cr3 values when unpinning pagetables
...55 +++++++++++++++++++++++++++++++--------------- arch/i386/xen/mmu.c | 29 +++++++++++++++++++++--- arch/i386/xen/xen-ops.h | 1 3 files changed, 65 insertions(+), 20 deletions(-) --- a/arch/i386/xen/enlighten.c +++ b/arch/i386/xen/enlighten.c @@ -56,7 +56,23 @@ DEFINE_PER_CPU(enum paravirt_lazy_mode, DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); -DEFINE_PER_CPU(unsigned long, xen_cr3); + +/* + * Note about cr3 (pagetable base) values: + * + * xen_cr3 contains the current logical cr3 value; it contains the + * last set cr3. This may not be...