lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Jul 2019 11:16:57 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Cc:     Radim Krčmář <rkrcmar@...hat.com>,
        Eduardo Habkost <ehabkost@...hat.com>
Subject: Re: [PATCH RESEND] i386/kvm: support guest access CORE cstate

On 15/07/19 03:28, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@...cent.com>
> 
> Allow guest reads CORE cstate when exposing host CPU power management capabilities 
> to the guest. PKG cstate is restricted to avoid a guest to get the whole package 
> information in multi-tenant scenario.
> 
> Cc: Eduardo Habkost <ehabkost@...hat.com>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Radim Krčmář <rkrcmar@...hat.com>
> Signed-off-by: Wanpeng Li <wanpengli@...cent.com>

Hi,

QEMU is in hard freeze now.  This will be applied after the release.

Thanks,

Paolo

> ---
>  linux-headers/linux/kvm.h | 4 +++-
>  target/i386/kvm.c         | 3 ++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
> index b53ee59..d648fde 100644
> --- a/linux-headers/linux/kvm.h
> +++ b/linux-headers/linux/kvm.h
> @@ -696,9 +696,11 @@ struct kvm_ioeventfd {
>  #define KVM_X86_DISABLE_EXITS_MWAIT          (1 << 0)
>  #define KVM_X86_DISABLE_EXITS_HLT            (1 << 1)
>  #define KVM_X86_DISABLE_EXITS_PAUSE          (1 << 2)
> +#define KVM_X86_DISABLE_EXITS_CSTATE         (1 << 3)
>  #define KVM_X86_DISABLE_VALID_EXITS          (KVM_X86_DISABLE_EXITS_MWAIT | \
>                                                KVM_X86_DISABLE_EXITS_HLT | \
> -                                              KVM_X86_DISABLE_EXITS_PAUSE)
> +                                              KVM_X86_DISABLE_EXITS_PAUSE | \
> +                                              KVM_X86_DISABLE_EXITS_CSTATE)
>  
>  /* for KVM_ENABLE_CAP */
>  struct kvm_enable_cap {
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 3b29ce5..49a0cc1 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -1645,7 +1645,8 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
>          if (disable_exits) {
>              disable_exits &= (KVM_X86_DISABLE_EXITS_MWAIT |
>                                KVM_X86_DISABLE_EXITS_HLT |
> -                              KVM_X86_DISABLE_EXITS_PAUSE);
> +                              KVM_X86_DISABLE_EXITS_PAUSE |
> +                              KVM_X86_DISABLE_EXITS_CSTATE);
>          }
>  
>          ret = kvm_vm_enable_cap(s, KVM_CAP_X86_DISABLE_EXITS, 0,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ