Displaying 20 results from an estimated 111 matches for "paravirt_patch_insns".
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...{
- const unsigned char *start, *end;
+ const unsigned char *start __maybe_unused, *end __maybe_unused;
unsigned ret;
#define PATCH_SITE(ops, x) \
case PARAVIRT_PATCH(ops.x): \
start = start_##ops##_##x; \
end = end_##ops##_##x; \
- goto patch_site
+ \
+ return paravirt_patch_insns(ibuf, len, start, end);
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -58,27 +60,24 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
if (pv_is_native_spin_unlock()) {
start = start_lock_queued_spin_unlock;
end = en...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...{
- const unsigned char *start, *end;
+ const unsigned char *start __maybe_unused, *end __maybe_unused;
unsigned ret;
#define PATCH_SITE(ops, x) \
case PARAVIRT_PATCH(ops.x): \
start = start_##ops##_##x; \
end = end_##ops##_##x; \
- goto patch_site
+ \
+ return paravirt_patch_insns(ibuf, len, start, end);
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -58,27 +60,24 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
if (pv_is_native_spin_unlock()) {
start = start_lock_queued_spin_unlock;
end = en...
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
...>
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 that label can simply be removed by directly calling
paravirt_patch_insns() there.
Signed-off-by: Borislav Petkov <bp at suse.de>
Cc: Juergen Gross <jgross at suse.com>
Cc: x86 at kernel.org
Cc: virtualization at lists.linux-foundation.org
---
arch/x86/kernel/paravirt_patch_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x8...
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
...>
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 that label can simply be removed by directly calling
paravirt_patch_insns() there.
Signed-off-by: Borislav Petkov <bp at suse.de>
Cc: Juergen Gross <jgross at suse.com>
Cc: x86 at kernel.org
Cc: virtualization at lists.linux-foundation.org
---
arch/x86/kernel/paravirt_patch_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x8...
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
...id *ibuf, unsigned long addr, unsigned len)
{
- const unsigned char *start, *end;
- unsigned ret;
-
#define PATCH_SITE(ops, x) \
- case PARAVIRT_PATCH(ops.x): \
- start = start_##ops##_##x; \
- end = end_##ops##_##x; \
- goto patch_site
+ case PARAVIRT_PATCH(ops.x): \
+ return paravirt_patch_insns(ibuf, len, start_##ops##_##x, end_##ops##_##x)
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -54,32 +50,26 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(mmu, write_cr3);
#endif
#if defined(CONFIG_PARAVIRT_SPINLO...
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
...id *ibuf, unsigned long addr, unsigned len)
{
- const unsigned char *start, *end;
- unsigned ret;
-
#define PATCH_SITE(ops, x) \
- case PARAVIRT_PATCH(ops.x): \
- start = start_##ops##_##x; \
- end = end_##ops##_##x; \
- goto patch_site
+ case PARAVIRT_PATCH(ops.x): \
+ return paravirt_patch_insns(ibuf, len, start_##ops##_##x, end_##ops##_##x)
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -54,32 +50,26 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(mmu, write_cr3);
#endif
#if defined(CONFIG_PARAVIRT_SPINLO...
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, addr, len);
>
> Why not replace the else clause by a "break;" and ...
Because I think that ex...
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, addr, len);
>
> Why not replace the else clause by a "break;" and ...
Because I think that ex...
2018 Sep 08
0
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...st unsigned char *start __maybe_unused, *end __maybe_unused;
> unsigned ret;
>
> #define PATCH_SITE(ops, x) \
> case PARAVIRT_PATCH(ops.x): \
> start = start_##ops##_##x; \
> end = end_##ops##_##x; \
> - goto patch_site
> + \
> + return paravirt_patch_insns(ibuf, len, start, end);
> +
> switch (type) {
> #ifdef CONFIG_PARAVIRT_XXL
> PATCH_SITE(irq, irq_disable);
> @@ -58,27 +60,24 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
> if (pv_is_native_spin_unlock()) {
> start = start_lock_...
2018 Sep 11
1
[PATCH v2] x86/paravirt: Cleanup native_patch()
...id *ibuf, unsigned long addr, unsigned len)
{
- const unsigned char *start, *end;
- unsigned ret;
-
#define PATCH_SITE(ops, x) \
- case PARAVIRT_PATCH(ops.x): \
- start = start_##ops##_##x; \
- end = end_##ops##_##x; \
- goto patch_site
+ case PARAVIRT_PATCH(ops.x): \
+ return paravirt_patch_insns(ibuf, len, start_##ops##_##x, end_##ops##_##x)
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -54,32 +50,24 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(mmu, write_cr3);
#endif
#if defined(CONFIG_PARAVIRT_SPINLO...
2014 Oct 27
5
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
..., %rax");
>
> +#if defined(CONFIG_PARAVIRT_SPINLOCKS)&& defined(CONFIG_QUEUE_SPINLOCK)
> +DEF_NATIVE(pv_lock_ops, queue_unlock, "movb $0, (%rdi)");
> +#endif
> +
> unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len)
> {
> return paravirt_patch_insns(insnbuf, len,
> @@ -61,6 +65,9 @@ unsigned native_patch(u8 type, u16 clobb
> PATCH_SITE(pv_cpu_ops, clts);
> PATCH_SITE(pv_mmu_ops, flush_tlb_single);
> PATCH_SITE(pv_cpu_ops, wbinvd);
> +#if defined(CONFIG_PARAVIRT_SPINLOCKS)&&a...
2014 Oct 27
5
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
..., %rax");
>
> +#if defined(CONFIG_PARAVIRT_SPINLOCKS)&& defined(CONFIG_QUEUE_SPINLOCK)
> +DEF_NATIVE(pv_lock_ops, queue_unlock, "movb $0, (%rdi)");
> +#endif
> +
> unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len)
> {
> return paravirt_patch_insns(insnbuf, len,
> @@ -61,6 +65,9 @@ unsigned native_patch(u8 type, u16 clobb
> PATCH_SITE(pv_cpu_ops, clts);
> PATCH_SITE(pv_mmu_ops, flush_tlb_single);
> PATCH_SITE(pv_cpu_ops, wbinvd);
> +#if defined(CONFIG_PARAVIRT_SPINLOCKS)&&a...
2018 Sep 10
0
[PATCH] x86/paravirt: Cleanup native_patch()
...; - const unsigned char *start, *end;
> - unsigned ret;
> -
> #define PATCH_SITE(ops, x) \
> - case PARAVIRT_PATCH(ops.x): \
> - start = start_##ops##_##x; \
> - end = end_##ops##_##x; \
> - goto patch_site
> + case PARAVIRT_PATCH(ops.x): \
> + return paravirt_patch_insns(ibuf, len, start_##ops##_##x, end_##ops##_##x)
> +
> switch (type) {
> #ifdef CONFIG_PARAVIRT_XXL
> PATCH_SITE(irq, irq_disable);
> @@ -54,32 +50,26 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
> PATCH_SITE(mmu, write_cr3);
> #endif...
2014 Oct 27
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...VIRT_SPINLOCKS)&& defined(CONFIG_QUEUE_SPINLOCK)
>>> +DEF_NATIVE(pv_lock_ops, queue_unlock, "movb $0, (%rdi)");
>>> +#endif
>>> +
>>> unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len)
>>> {
>>> return paravirt_patch_insns(insnbuf, len,
>>> @@ -61,6 +65,9 @@ unsigned native_patch(u8 type, u16 clobb
>>> PATCH_SITE(pv_cpu_ops, clts);
>>> PATCH_SITE(pv_mmu_ops, flush_tlb_single);
>>> PATCH_SITE(pv_cpu_ops, wbinvd);
>>> +#if d...
2014 Oct 27
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...VIRT_SPINLOCKS)&& defined(CONFIG_QUEUE_SPINLOCK)
>>> +DEF_NATIVE(pv_lock_ops, queue_unlock, "movb $0, (%rdi)");
>>> +#endif
>>> +
>>> unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len)
>>> {
>>> return paravirt_patch_insns(insnbuf, len,
>>> @@ -61,6 +65,9 @@ unsigned native_patch(u8 type, u16 clobb
>>> PATCH_SITE(pv_cpu_ops, clts);
>>> PATCH_SITE(pv_mmu_ops, flush_tlb_single);
>>> PATCH_SITE(pv_cpu_ops, wbinvd);
>>> +#if d...
2015 Mar 16
0
[PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock
...+
unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
{
@@ -47,14 +53,22 @@ unsigned native_patch(u8 type, u16 clobb
PATCH_SITE(pv_mmu_ops, write_cr3);
PATCH_SITE(pv_cpu_ops, clts);
PATCH_SITE(pv_cpu_ops, read_tsc);
-
- patch_site:
- ret = paravirt_patch_insns(ibuf, len, start, end);
- break;
+#if defined(CONFIG_PARAVIRT_SPINLOCKS) && defined(CONFIG_QUEUE_SPINLOCKS)
+ case PARAVIRT_PATCH(pv_lock_ops.queue_spin_unlock):
+ if (pv_is_native_spin_unlock()) {
+ start = start_pv_lock_ops_queue_spin_unlock;
+ end = end_pv_lock_ops_queue_spin...
2015 Mar 16
0
[PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock
...+
unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
{
@@ -47,14 +53,22 @@ unsigned native_patch(u8 type, u16 clobb
PATCH_SITE(pv_mmu_ops, write_cr3);
PATCH_SITE(pv_cpu_ops, clts);
PATCH_SITE(pv_cpu_ops, read_tsc);
-
- patch_site:
- ret = paravirt_patch_insns(ibuf, len, start, end);
- break;
+#if defined(CONFIG_PARAVIRT_SPINLOCKS) && defined(CONFIG_QUEUE_SPINLOCKS)
+ case PARAVIRT_PATCH(pv_lock_ops.queue_spin_unlock):
+ if (pv_is_native_spin_unlock()) {
+ start = start_pv_lock_ops_queue_spin_unlock;
+ end = end_pv_lock_ops_queue_spin...
2007 Apr 19
3
[RFC, PATCH 1/5] Paravirt_ops full patching.patch
...irt ops patching of PAE functions.
Signed-off-by: Zachary Amsden <zach@vmware.com>
diff -r dbe11208916f include/asm-i386/paravirt.h
--- a/include/asm-i386/paravirt.h Thu Apr 19 11:40:55 2007 -0700
+++ b/include/asm-i386/paravirt.h Thu Apr 19 12:04:16 2007 -0700
@@ -308,10 +308,9 @@ unsigned paravirt_patch_insns(void *site
* return value handling from within these macros. This is fairly
* cumbersome.
*
- * There are 5 sets of PVOP_* macros for dealing with 0-4 arguments.
- * It could be extended to more arguments, but there would be little
- * to be gained from that. For each number of arguments, t...
2007 Apr 19
3
[RFC, PATCH 1/5] Paravirt_ops full patching.patch
...irt ops patching of PAE functions.
Signed-off-by: Zachary Amsden <zach@vmware.com>
diff -r dbe11208916f include/asm-i386/paravirt.h
--- a/include/asm-i386/paravirt.h Thu Apr 19 11:40:55 2007 -0700
+++ b/include/asm-i386/paravirt.h Thu Apr 19 12:04:16 2007 -0700
@@ -308,10 +308,9 @@ unsigned paravirt_patch_insns(void *site
* return value handling from within these macros. This is fairly
* cumbersome.
*
- * There are 5 sets of PVOP_* macros for dealing with 0-4 arguments.
- * It could be extended to more arguments, but there would be little
- * to be gained from that. For each number of arguments, t...
2015 Apr 30
0
[PATCH 4/6] x86: introduce new pvops function spin_unlock
...ent_32(void *insnbuf, unsigned len)
{
/* arg in %eax, return in %eax */
@@ -24,6 +34,21 @@ unsigned paravirt_patch_ident_64(void *insnbuf, unsigned len)
return 0;
}
+unsigned paravirt_patch_unlock(void *insnbuf, unsigned len)
+{
+ switch (sizeof(__ticket_t)) {
+ case __X86_CASE_B:
+ return paravirt_patch_insns(insnbuf, len,
+ start__unlock1, end__unlock1);
+ case __X86_CASE_W:
+ return paravirt_patch_insns(insnbuf, len,
+ start__unlock2, end__unlock2);
+ default:
+ __unlock_wrong_size();
+ }
+ return 0;
+}
+
unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
unsigned lon...