Displaying 20 results from an estimated 200 matches for "paravirt_patch".
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but those labels can simply be removed by directly calling the
respective functions there.
Get rid of local variables too, while at it.
S...
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but those labels can simply be removed by directly calling the
respective functions there.
Get rid of local variables too, while at it.
S...
2018 Sep 10
2
[PATCH] x86/paravirt: Cleanup native_patch()
On Mon, Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote:
> > + case PARAVIRT_PATCH(lock.queued_spin_unlock):
> > + if (pv_is_native_spin_unlock())
> > + return paravirt_patch_insns(ibuf, len,
> > + start_lock_queued_spin_unlock,
> > + end_lock_queued_spin_unlock);
> > + else
> > + return paravirt_patch_default(type, ibuf...
2018 Sep 10
2
[PATCH] x86/paravirt: Cleanup native_patch()
On Mon, Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote:
> > + case PARAVIRT_PATCH(lock.queued_spin_unlock):
> > + if (pv_is_native_spin_unlock())
> > + return paravirt_patch_insns(ibuf, len,
> > + start_lock_queued_spin_unlock,
> > + end_lock_queued_spin_unlock);
> > + else
> > + return paravirt_patch_default(type, ibuf...
2018 Sep 11
1
[PATCH v2] x86/paravirt: Cleanup native_patch()
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but those labels can simply be removed by directly calling the
respective functions there.
Get rid of local variables too, while at it. Al...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...rsions. It boots here and a bunch of all*config builds pass.
---
From: Borislav Petkov <bp at suse.de>
Date: Fri, 7 Sep 2018 12:47:10 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but those labels can simply be removed by directly calling the
respective functions there.
Signed-off-by: Borislav Petkov <bp at suse.d...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...rsions. It boots here and a bunch of all*config builds pass.
---
From: Borislav Petkov <bp at suse.de>
Date: Fri, 7 Sep 2018 12:47:10 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but those labels can simply be removed by directly calling the
respective functions there.
Signed-off-by: Borislav Petkov <bp at suse.d...
2016 Dec 14
1
[PATCH] arch: x86: kernel: fixed unused label issue
The patch_default label is only used from within
case PARAVIRT_PATCH(pv_lock_ops.queued_spin_unlock)
and
case PARAVIRT_PATCH(pv_lock_ops.vcpu_is_preempted)
i.e. when #if defined(CONFIG_PARAVIRT_SPINLOCKS) is true.
Therefore no code jumps to this label in case CONFIG_PARAVIRT_SPINLOCKS
is not defined and label should be removed in that case.
Moving #endif directive...
2016 Dec 14
1
[PATCH] arch: x86: kernel: fixed unused label issue
The patch_default label is only used from within
case PARAVIRT_PATCH(pv_lock_ops.queued_spin_unlock)
and
case PARAVIRT_PATCH(pv_lock_ops.vcpu_is_preempted)
i.e. when #if defined(CONFIG_PARAVIRT_SPINLOCKS) is true.
Therefore no code jumps to this label in case CONFIG_PARAVIRT_SPINLOCKS
is not defined and label should be removed in that case.
Moving #endif directive...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...);
+ pv_info.name);
}
char *memory_setup(void)
{
- return paravirt_ops.memory_setup();
+ return pv_init_ops.memory_setup();
}
/* Simple instruction patching code. */
@@ -75,31 +77,34 @@ static unsigned native_patch(u8 type, u1
unsigned ret;
switch(type) {
-#define SITE(x) case PARAVIRT_PATCH(x): start = start_##x; end = end_##x; goto patch_site
- SITE(irq_disable);
- SITE(irq_enable);
- SITE(restore_fl);
- SITE(save_fl);
- SITE(iret);
- SITE(irq_enable_sysexit);
- SITE(read_cr2);
- SITE(read_cr3);
- SITE(write_cr3);
- SITE(clts);
- SITE(read_tsc);
+#define SITE(ops,x) \
+...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...);
+ pv_info.name);
}
char *memory_setup(void)
{
- return paravirt_ops.memory_setup();
+ return pv_init_ops.memory_setup();
}
/* Simple instruction patching code. */
@@ -75,31 +77,34 @@ static unsigned native_patch(u8 type, u1
unsigned ret;
switch(type) {
-#define SITE(x) case PARAVIRT_PATCH(x): start = start_##x; end = end_##x; goto patch_site
- SITE(irq_disable);
- SITE(irq_enable);
- SITE(restore_fl);
- SITE(save_fl);
- SITE(iret);
- SITE(irq_enable_sysexit);
- SITE(read_cr2);
- SITE(read_cr3);
- SITE(write_cr3);
- SITE(clts);
- SITE(read_tsc);
+#define SITE(ops,x) \
+...
2018 Sep 10
0
[PATCH] x86/paravirt: Cleanup native_patch()
On 08/09/18 17:28, Borislav Petkov wrote:
> When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
>
> arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
> arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
> patch_site:
>
> but those labels can simply be removed by directly calling the
> respective functions there.
>
> Get rid of l...
2007 Apr 18
0
[PATCH] Update lguest's patch code for new paravirt patch architecture
The new patching code means that we don't actually have to do as much
work in lguest's patcher.
We use paravirt_patch_default() for cases we don't want to patch
inline, which automatically handles the "patch iret to use a direct
jump" case.
There's no measurable effect on lguest's virtbench scores tho.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/lguest.c...
2007 Apr 18
0
[PATCH] Update lguest's patch code for new paravirt patch architecture
The new patching code means that we don't actually have to do as much
work in lguest's patcher.
We use paravirt_patch_default() for cases we don't want to patch
inline, which automatically handles the "patch iret to use a direct
jump" case.
There's no measurable effect on lguest's virtbench scores tho.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/lguest.c...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...read_tsc, "rdtsc");
+
+DEF_NATIVE(, ud2a, "ud2a");
static unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
@@ -76,35 +78,27 @@ static unsigned native_patch(u8 type, u1
unsigned ret;
switch(type) {
-#define SITE(x) case PARAVIRT_PATCH(x): start = start_##x; end = end_##x; goto patch_site
- SITE(irq_disable);
- SITE(irq_enable);
- SITE(restore_fl);
- SITE(save_fl);
- SITE(iret);
- SITE(irq_enable_sysexit);
- SITE(read_cr2);
- SITE(read_cr3);
- SITE(write_cr3);
- SITE(clts);
- SITE(read_tsc);
+#define SITE(ops, x)...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...read_tsc, "rdtsc");
+
+DEF_NATIVE(, ud2a, "ud2a");
static unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
@@ -76,35 +78,27 @@ static unsigned native_patch(u8 type, u1
unsigned ret;
switch(type) {
-#define SITE(x) case PARAVIRT_PATCH(x): start = start_##x; end = end_##x; goto patch_site
- SITE(irq_disable);
- SITE(irq_enable);
- SITE(restore_fl);
- SITE(save_fl);
- SITE(iret);
- SITE(irq_enable_sysexit);
- SITE(read_cr2);
- SITE(read_cr3);
- SITE(write_cr3);
- SITE(clts);
- SITE(read_tsc);
+#define SITE(ops, x)...
2007 Sep 28
2
[PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops
...read_tsc, "rdtsc");
+
+DEF_NATIVE(, ud2a, "ud2a");
static unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
@@ -76,35 +78,25 @@ static unsigned native_patch(u8 type, u1
unsigned ret;
switch(type) {
-#define SITE(x) case PARAVIRT_PATCH(x): start = start_##x; end = end_##x; goto patch_site
- SITE(irq_disable);
- SITE(irq_enable);
- SITE(restore_fl);
- SITE(save_fl);
- SITE(iret);
- SITE(irq_enable_sysexit);
- SITE(read_cr2);
- SITE(read_cr3);
- SITE(write_cr3);
- SITE(clts);
- SITE(read_tsc);
+#define SITE(ops, x) \...
2007 Sep 28
2
[PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops
...read_tsc, "rdtsc");
+
+DEF_NATIVE(, ud2a, "ud2a");
static unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
@@ -76,35 +78,25 @@ static unsigned native_patch(u8 type, u1
unsigned ret;
switch(type) {
-#define SITE(x) case PARAVIRT_PATCH(x): start = start_##x; end = end_##x; goto patch_site
- SITE(irq_disable);
- SITE(irq_enable);
- SITE(restore_fl);
- SITE(save_fl);
- SITE(iret);
- SITE(irq_enable_sysexit);
- SITE(read_cr2);
- SITE(read_cr3);
- SITE(write_cr3);
- SITE(clts);
- SITE(read_tsc);
+#define SITE(ops, x) \...
2017 Oct 04
0
[PATCH 08/13] x86/paravirt: Clean up paravirt_types.h
...ude/asm/paravirt_types.h
index 01f9e10983c1..5656aea79412 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -331,33 +331,6 @@ extern struct pv_irq_ops pv_irq_ops;
extern struct pv_mmu_ops pv_mmu_ops;
extern struct pv_lock_ops pv_lock_ops;
-#define PARAVIRT_PATCH(x) \
- (offsetof(struct paravirt_patch_template, x) / sizeof(void *))
-
-#define paravirt_type(op) \
- [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \
- [paravirt_opptr] "i" (&(op))
-#define paravirt_clobber(clobber) \
- [paravirt_clobber] "i" (clobber)
-
-/...
2007 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...>
#include <asm/alternative.h>
#include <asm/sections.h>
+#include <asm/paravirt.h>
#define DEBUG 0
#if DEBUG
@@ -283,6 +284,35 @@ void alternatives_smp_switch(int smp)
spin_unlock_irqrestore(&smp_alt, flags);
}
+#ifdef CONFIG_PARAVIRT
+void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end)
+{
+ unsigned char **noptable = find_nop_table();
+ struct paravirt_patch *p;
+ int diff, i, k;
+
+ for (p = start; p < end; p++) {
+ unsigned int used;
+ used = paravirt_ops.patch(p->instrtype, p->instr, p->len);
+ /* Pad the rest with nops */
+...