Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread Dongli Zhang
Hi Vitaly, Sean and David, On 10/19/23 08:40, Sean Christopherson wrote: > On Thu, Oct 19, 2023, Vitaly Kuznetsov wrote: >> Dongli Zhang writes: >> >>> As mentioned in the linux kernel development document, "sched_clock() is >>> used for scheduling and timestamping". While there is a default

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread Sean Christopherson
On Thu, Oct 19, 2023, David Woodhouse wrote: > On Thu, 2023-10-19 at 08:40 -0700, Sean Christopherson wrote: > > > If for some 'historical reasons' we can't revoke features we can always > > > introduce a new PV feature bit saying that TSC is preferred. > > Don't we already have one? It's the

Re: Incorrect definition of hv_enable_vp_vtl in hyperv-tlfs.h

2023-10-19 Thread Nuno Das Neves
On 10/16/2023 4:49 AM, Alex Ionescu wrote: Hi, In arch/x86/include/asm/hyperv-tlfs.h, the following definition at line 786 (in Linus' tree), I believe to be incorrect. struct hv_enable_vp_vtl { u64partition_id; u32vp_index; union hv_input_vtl

Re: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-19 Thread Dave Hansen
> --- a/arch/x86/hyperv/ivm.c > +++ b/arch/x86/hyperv/ivm.c > @@ -450,6 +450,16 @@ static bool hv_is_private_mmio(u64 addr) > return false; > } > > +static void hv_print_mem_enc_feature_info(void) > +{ > + enum hv_isolation_type type = hv_get_isolation_type(); > + > + if (type ==

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread David Woodhouse
On Thu, 2023-10-19 at 08:40 -0700, Sean Christopherson wrote: > > > Normally, it should be up to the hypervisor to tell the guest which > > clock to use, i.e. if TSC is reliable or not. Let me put my question > > this way: if TSC on the particular host is good for everything, why > > does the

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread Sean Christopherson
On Thu, Oct 19, 2023, Vitaly Kuznetsov wrote: > Dongli Zhang writes: > > > As mentioned in the linux kernel development document, "sched_clock() is > > used for scheduling and timestamping". While there is a default native > > implementation, many paravirtualizations have their own

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread Vitaly Kuznetsov
Dongli Zhang writes: > As mentioned in the linux kernel development document, "sched_clock() is > used for scheduling and timestamping". While there is a default native > implementation, many paravirtualizations have their own implementations. > > About KVM, it uses kvm_sched_clock_read() and

[PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-19 Thread Dexuan Cui
Hyper-V provides two modes for running a TDX/SNP VM: 1) In TD Partitioning mode (TDX) or vTOM mode (SNP) with a paravisor; 2) In "fully enlightened" mode with the normal TDX shared bit or SNP C-bit control over page encryption, and no paravisor. In the first mode (i.e. paravisor mode), the