Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp652096pxb; Fri, 13 Aug 2021 03:23:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyhzx2pgAToFi9hjPbhNaRQ/h0g9aYrGUUYn3wXN81h4eJu7iBerxATsQRMbMSx2f8TEBF X-Received: by 2002:a17:906:4a48:: with SMTP id a8mr1731626ejv.524.1628850233331; Fri, 13 Aug 2021 03:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628850233; cv=none; d=google.com; s=arc-20160816; b=ZOdig44W2UFkRTT0TUb6Aq15wBLyHRRMs/WItp9IUvssC5f4HzpwI5ScrqgEsb84Ep 4H5IYH0PmEFKHu0z5KR3IMfDfXytG64X5dKbWzWJvZm3Ftscckw5h4pTkuJwiPFqOCPx AGIprW/0QXq2nXAAxmJfQblupMlfkpdbwKUZNKrYxvTpi1PWoQYm+GTQLp8OC8GYOixy 6RC6SN6XPWRqMfrrONNHGBzG5j2rGNj+rOKk/MoO7OJDTghHon2vCI6SZZ19YYqO0nGa g9Y9x+Okv3Y2L/dAFBRb0UhEp0I2rTDicaRTgmpEy/BEK2xhxrtOWClmMhVK7YhFHfW4 LxTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:message-id:subject:cc:to:from:date; bh=MFmJC9YvhucicYbSRdRnA36XbT/6EW/454dK6VKDa4g=; b=V225NM4D8P1hEbzkjmsGBaA1SK1QAsVgdoJscxPXp5O/NkVeKb3qZ9QqkIaaOm62hK P9q6xYkRNUSn3oZ/ksuFXllmTH2jx9fILaOHgNkrC8jqqyoRJOO35dKXlwpPLVWeJtG/ SiaapZCoenMJCNDE+iSZQ4mCb3bNN/AKEn5jyJaLkb0WgtbWdV6s8EKB65WbnbeEEZiV DlqyKrAEZ83tZXfy1+Ed6Vxax4BLfy0SYDha++Z/kpGTxCZ5K8yFDyMo32cnHAm6ztIY QNv+0v7ExEdb0YDkiJX5sIIE6L9QqDO2n4LvC0Vg1ho0p6Z0VjeyYNgTTMoKt838w9T+ oe7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kingsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si1630873edm.532.2021.08.13.03.23.26; Fri, 13 Aug 2021 03:23:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kingsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239409AbhHMKKA (ORCPT + 99 others); Fri, 13 Aug 2021 06:10:00 -0400 Received: from mail.kingsoft.com ([114.255.44.145]:33646 "EHLO mail.kingsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238808AbhHMKJ7 (ORCPT ); Fri, 13 Aug 2021 06:09:59 -0400 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Fri, 13 Aug 2021 06:09:58 EDT X-AuditID: 0a580157-219ff7000004b751-85-61164151898d Received: from mail.kingsoft.com (bogon [10.88.1.79]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-1-NODE-87) with SMTP id 9D.4C.46929.15146116; Fri, 13 Aug 2021 17:54:25 +0800 (HKT) Received: from alex-virtual-machine (172.16.253.254) by KSBJMAIL4.kingsoft.cn (10.88.1.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 13 Aug 2021 17:54:25 +0800 Date: Fri, 13 Aug 2021 17:54:20 +0800 From: Aili Yao To: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov CC: , , "H. Peter Anvin" , , Subject: KVM: x86: expose HINTS_REALTIME ablility to qemu Message-ID: <20210813175420.62ab2ac2@alex-virtual-machine> Organization: kingsoft X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.253.254] X-ClientProxiedBy: KSbjmail3.kingsoft.cn (10.88.1.78) To KSBJMAIL4.kingsoft.cn (10.88.1.79) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42LhimD01w10FEs0eL9Zz+Lzhn9sFtM2ilts nX6FzaJz9gZ2izlTCy0u75rDZnHpwAImi/3b/rFaHD1/i8li86apzBaTWi8zW+y684TF4seG x6wWz1qvsjjweTw5OI/J43trH4vHzll32T0WbCr12LSqk83j3blz7B7v911l82iceo3N4/Mm OY8TLV9YA7iiuGxSUnMyy1KL9O0SuDImvtnOXHCLrWLD83a2Bsa9rF2MHBwSAiYSl96wdzFy cQgJTGaSuHR9JRuE85pRYuWR7UBFnBwsAqoS209MZQSx2YDsXfdmgcVFBM4ySez5zwzSwCzQ zijxeOsWdpCEsIClxIeTK8BsXgEriSWz94M18wuISfRe+c8Esdle4vF6RYgSQYmTM5+wgNjM AjoSJ1YdY4aw5SW2v50DZgsJKEocXvILbKSEgJLEke4ZbBB2rMS19dcZJzAKzkIyahaSUbOQ jFrAyLyKkaU4N91wEyMkmsJ3MM5r+qh3iJGJg/EQowQHs5IIb7GwWKIQb0piZVVqUX58UWlO avEhRmkOFiVx3jR3oUQhgfTEktTs1NSC1CKYLBMHp1QDU/G2srUzJWQWOUlduKl7xku7fo3Z /snrz4bIbGjsypLO+/0rWubW89U/7uucDXy7YlquaoTj/U2Pd5QY7Kn9wiXSw3Fv6YMXMu0W 9i273O+KrH0itH6O25cYy5U38jhm3ufnFH/l/9ja2/v95H0J66cs2i439WmV360D2/NLIkrD RLZWvT0gN9c4KrXyUJrpfK0H1aryR0Iq5A7euXn92POYZIPHXX+MwmZf6HTb8uCN8B+j5+wz Tu37tMB8Zbvn93cp3IKzuE8WHJiyf97GDxs1y3eU7pZWsK1hPHSs637+/5RZJkwqkYa9/0KX 7HizoSprtXZpP+PPigPWKtWh3jYipwJy/MOmLTH7fXzTVgslluKMREMt5qLiRADBuEJzFQMA AA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When I do a test that try to enable hint-dedicated for one VM, but qemu says "warning: host doesn't support requested feature: CPUID.40000001H:EDX.kvm-hint-dedicated [bit 0]". It seems the kernel hasn't expose this ability even when supporting it; So expose it. Signed-off-by: Aili Yao --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 739be5da3bca..2153014742d7 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -917,7 +917,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) entry->ebx = 0; entry->ecx = 0; - entry->edx = 0; + entry->edx = (1 << KVM_HINTS_REALTIME); break; case 0x80000000: entry->eax = min(entry->eax, 0x8000001f); -- 2.25.1