Displaying 8 results from an estimated 8 matches for "hv_root_partit".
2020 Sep 15
0
[PATCH RFC v1 07/18] x86/hyperv: extract partition ID from Microsoft Hypervisor if necessary
...ric/hyperv-tlfs.h | 6 ++++++
> 3 files changed, 34 insertions(+)
>
> diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
> index ebba4be4185d..0eec1ed32023 100644
> --- a/arch/x86/hyperv/hv_init.c
> +++ b/arch/x86/hyperv/hv_init.c
> @@ -30,6 +30,9 @@
> bool hv_root_partition;
> EXPORT_SYMBOL_GPL(hv_root_partition);
>
> +u64 hv_current_partition_id;
> +EXPORT_SYMBOL_GPL(hv_current_partition_id);
> +
> void *hv_hypercall_pg;
> EXPORT_SYMBOL_GPL(hv_hypercall_pg);
>
> @@ -345,6 +348,26 @@ static struct syscore_ops hv_syscore_ops = {
>...
2020 Sep 15
0
[PATCH RFC v1 08/18] x86/hyperv: handling hypercall page setup for root
...; > #include <linux/cpuhotplug.h>
>> > #include <linux/syscore_ops.h>
>> > #include <clocksource/hyperv_timer.h>
>> > +#include <linux/highmem.h>
>> >
>> > /* Is Linux running as the root partition? */
>> > bool hv_root_partition;
>> > @@ -448,8 +449,29 @@ void __init hyperv_init(void)
>> >
>> > rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
>> > hypercall_msr.enable = 1;
>> > - hypercall_msr.guest_physical_address = vmalloc_to_pfn(hv_hypercall_pg);
>> >...
2020 Sep 15
0
[PATCH RFC v1 06/18] x86/hyperv: allocate output arg pages if required
...(irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
> - if (unlikely(!pg))
> + input_pg = alloc_page(irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
> + if (unlikely(!input_pg))
> return -ENOMEM;
> - *input_arg = page_address(pg);
> + *input_arg = page_address(input_pg);
> +
> + if (hv_root_partition) {
> + struct page *output_pg;
> + void **output_arg;
> +
> + output_pg = alloc_page(irqs_disabled() ? GFP_ATOMIC :
> GFP_KERNEL);
To simplify the code, can we just rename 'input_arg' to 'hypercall_args'
and do alloc_pages(rqs_disabled() ? GFP_ATOMIC : GFP_KE...
2020 Sep 15
0
[PATCH RFC v1 08/18] x86/hyperv: handling hypercall page setup for root
...gt;> > #include <linux/syscore_ops.h>
>> >> > #include <clocksource/hyperv_timer.h>
>> >> > +#include <linux/highmem.h>
>> >> >
>> >> > /* Is Linux running as the root partition? */
>> >> > bool hv_root_partition;
>> >> > @@ -448,8 +449,29 @@ void __init hyperv_init(void)
>> >> >
>> >> > rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
>> >> > hypercall_msr.enable = 1;
>> >> > - hypercall_msr.guest_physical_address = v...
2020 Sep 15
0
[PATCH RFC v1 08/18] x86/hyperv: handling hypercall page setup for root
...+++ b/arch/x86/hyperv/hv_init.c
> @@ -25,6 +25,7 @@
> #include <linux/cpuhotplug.h>
> #include <linux/syscore_ops.h>
> #include <clocksource/hyperv_timer.h>
> +#include <linux/highmem.h>
>
> /* Is Linux running as the root partition? */
> bool hv_root_partition;
> @@ -448,8 +449,29 @@ void __init hyperv_init(void)
>
> rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
> hypercall_msr.enable = 1;
> - hypercall_msr.guest_physical_address = vmalloc_to_pfn(hv_hypercall_pg);
> - wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint6...
2020 Sep 15
0
[PATCH RFC v1 05/18] clocksource/hyperv: use MSR-based access if running as root
...1..fe96082ce85e 100644
> --- a/drivers/clocksource/hyperv_timer.c
> +++ b/drivers/clocksource/hyperv_timer.c
> @@ -426,6 +426,9 @@ static bool __init hv_init_tsc_clocksource(void)
> if (!(ms_hyperv.features & HV_MSR_REFERENCE_TSC_AVAILABLE))
> return false;
>
> + if (hv_root_partition)
> + return false;
> +
Out of pure curiosity,
TSC page clocksource seems to be available to the root partition (as
HV_MSR_REFERENCE_TSC_AVAILABLE is set), why don't we use it? (I
understand that with TSC scaling support in modern CPUs even migration
is a no-issue and we can use raw...
2020 Sep 15
0
[PATCH RFC v1 10/18] x86/hyperv: implement and use hv_smp_prepare_cpus
...BUG_ON(ret);
> + }
> +#endif
> +}
> #endif
>
> static void __init ms_hyperv_init_platform(void)
> @@ -359,6 +384,8 @@ static void __init ms_hyperv_init_platform(void)
>
> # ifdef CONFIG_SMP
> smp_ops.smp_prepare_boot_cpu = hv_smp_prepare_boot_cpu;
> + if (hv_root_partition)
> + smp_ops.smp_prepare_cpus = hv_smp_prepare_cpus;
> # endif
>
> /*
--
Vitaly
2020 Sep 16
0
[PATCH RFC v1 06/18] x86/hyperv: allocate output arg pages if required
...pg = alloc_page(irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
>> > > + if (unlikely(!input_pg))
>> > > return -ENOMEM;
>> > > - *input_arg = page_address(pg);
>> > > + *input_arg = page_address(input_pg);
>> > > +
>> > > + if (hv_root_partition) {
>> > > + struct page *output_pg;
>> > > + void **output_arg;
>> > > +
>> > > + output_pg = alloc_page(irqs_disabled() ? GFP_ATOMIC :
>> > > GFP_KERNEL);
>> >
>> > To simplify the code, can we just rename '...