Displaying 12 results from an estimated 12 matches for "test_cpu_flag_of".
2016 Oct 19
2
[PATCH v2 1/1] s390/spinlock: Provide vcpu_is_preempted
...h/s390/kernel/smp.c
> +++ b/arch/s390/kernel/smp.c
> @@ -376,10 +376,15 @@ int smp_find_processor_id(u16 address)
> return -1;
> }
>
> -int smp_vcpu_scheduled(int cpu)
> +bool arch_vcpu_is_preempted(int cpu)
> {
> - return pcpu_running(pcpu_devices + cpu);
> + if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
> + return false;
> + if (pcpu_running(pcpu_devices + cpu))
> + return false;
> + return true;
> }
> +EXPORT_SYMBOL(arch_vcpu_is_preempted);
>
> void smp_yield_cpu(int cpu)
> {
> diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlo...
2016 Oct 19
2
[PATCH v2 1/1] s390/spinlock: Provide vcpu_is_preempted
...h/s390/kernel/smp.c
> +++ b/arch/s390/kernel/smp.c
> @@ -376,10 +376,15 @@ int smp_find_processor_id(u16 address)
> return -1;
> }
>
> -int smp_vcpu_scheduled(int cpu)
> +bool arch_vcpu_is_preempted(int cpu)
> {
> - return pcpu_running(pcpu_devices + cpu);
> + if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
> + return false;
> + if (pcpu_running(pcpu_devices + cpu))
> + return false;
> + return true;
> }
> +EXPORT_SYMBOL(arch_vcpu_is_preempted);
>
> void smp_yield_cpu(int cpu)
> {
> diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlo...
2016 Oct 04
0
[PATCH v2 1/1] s390/spinlock: Provide vcpu_is_preempted
...kernel/smp.c:371:int smp_vcpu_scheduled(int cpu)
>>> arch/s390/lib/spinlock.c:44: if (smp_vcpu_scheduled(cpu))
>>>
>>>> +bool arch_vcpu_is_preempted(int cpu)
>>>> {
>>>> - return pcpu_running(pcpu_devices + cpu);
>>>> + if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
>>>> + return false;
>>>> + if (pcpu_running(pcpu_devices + cpu))
>>>> + return false;
>>> I saw smp_vcpu_scheduled() returns true always on !SMP system.
>>>
>>> maybe we can do somegthing silima...
2016 Oct 04
0
[PATCH v2 1/1] s390/spinlock: Provide vcpu_is_preempted
...kernel/smp.c:371:int smp_vcpu_scheduled(int cpu)
>>> arch/s390/lib/spinlock.c:44: if (smp_vcpu_scheduled(cpu))
>>>
>>>> +bool arch_vcpu_is_preempted(int cpu)
>>>> {
>>>> - return pcpu_running(pcpu_devices + cpu);
>>>> + if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
>>>> + return false;
>>>> + if (pcpu_running(pcpu_devices + cpu))
>>>> + return false;
>>> I saw smp_vcpu_scheduled() returns true always on !SMP system.
>>>
>>> maybe we can do somegthing silima...
2016 Oct 19
1
[PATCH v3] s390/spinlock: Provide vcpu_is_preempted
...nel/smp.c
index 35531fe..b988ed1 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -368,10 +368,15 @@ int smp_find_processor_id(u16 address)
return -1;
}
-int smp_vcpu_scheduled(int cpu)
+bool arch_vcpu_is_preempted(int cpu)
{
- return pcpu_running(pcpu_devices + cpu);
+ if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
+ return false;
+ if (pcpu_running(pcpu_devices + cpu))
+ return false;
+ return true;
}
+EXPORT_SYMBOL(arch_vcpu_is_preempted);
void smp_yield_cpu(int cpu)
{
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index e5f50a7..e48a48e 100644
--- a/arch/s39...
2016 Oct 19
1
[PATCH v3] s390/spinlock: Provide vcpu_is_preempted
...nel/smp.c
index 35531fe..b988ed1 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -368,10 +368,15 @@ int smp_find_processor_id(u16 address)
return -1;
}
-int smp_vcpu_scheduled(int cpu)
+bool arch_vcpu_is_preempted(int cpu)
{
- return pcpu_running(pcpu_devices + cpu);
+ if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
+ return false;
+ if (pcpu_running(pcpu_devices + cpu))
+ return false;
+ return true;
}
+EXPORT_SYMBOL(arch_vcpu_is_preempted);
void smp_yield_cpu(int cpu)
{
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index e5f50a7..e48a48e 100644
--- a/arch/s39...
2016 Oct 20
15
[PATCH v5 0/9] implement vcpu preempted check
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
add x86 vcpu preempted check patch
change from v2:
no code change, fix typos, update some comments
change from v1:
a simplier definition of default vcpu_is_preempted
skip mahcine type check on ppc,
2016 Oct 20
15
[PATCH v5 0/9] implement vcpu preempted check
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
add x86 vcpu preempted check patch
change from v2:
no code change, fix typos, update some comments
change from v1:
a simplier definition of default vcpu_is_preempted
skip mahcine type check on ppc,
2016 Nov 02
13
[PATCH v7 00/11] implement vcpu preempted check
change from v6:
fix typos and remove uncessary comments.
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
2016 Nov 02
13
[PATCH v7 00/11] implement vcpu preempted check
change from v6:
fix typos and remove uncessary comments.
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
2016 Oct 28
16
[PATCH v6 00/11] implement vcpu preempted check
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
add x86 vcpu preempted check patch
change from v2:
no code
2016 Oct 28
16
[PATCH v6 00/11] implement vcpu preempted check
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
add x86 vcpu preempted check patch
change from v2:
no code