From patchwork Fri May 25 11:06:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 10427103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87C3C602D8 for ; Fri, 25 May 2018 11:06:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77322295E0 for ; Fri, 25 May 2018 11:06:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AC2229646; Fri, 25 May 2018 11:06:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BB86295E0 for ; Fri, 25 May 2018 11:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965906AbeEYLGj (ORCPT ); Fri, 25 May 2018 07:06:39 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:40954 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965795AbeEYLGi (ORCPT ); Fri, 25 May 2018 07:06:38 -0400 Received: by mail-ot0-f193.google.com with SMTP id n1-v6so5601129otf.7 for ; Fri, 25 May 2018 04:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9gO4507jZl1Pm6ocDhMx1ZIhDS85a3ZW1mZR8o6rh1I=; b=L3uvIK8CmaS8/aT05zIADKZEaY8IgAzjWFT2t5pFVbtzwmOi+TCcIl1reO2tK3Ooia X7oIN0tF7U69GFEU9+qsbzqyrfJzl8kr7kKsGX1IFcuxoOTerAejH7EQhdVA+gOEGTpt jM8HR8qU9zw7zCeLp98CfEILMPE0zFoDf5ndw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9gO4507jZl1Pm6ocDhMx1ZIhDS85a3ZW1mZR8o6rh1I=; b=Br9PCfwE3v/iSFKFbii/ndA7NwCedLncu8PFzsE8mqrpDU7WVQpJ/1zGlZriwjE61p SkgwBG3yl56vX4ljl9irecjem8lZi3El8bWvS6K2U7gs1a95yoF3vXHnJH5vurwW5/KK XjCN86XSCj6sA+43oHMM2lRHrvUf+VE6qI4Z4ICPZabaonrkaQZeUkz61OLRIlfAkKpn 1wLpv6mnmCsGFLCHJrAjRkCQt0V7GYoQTo5jkn0MFaV77h5jjQC9WRGsWPLO3FvI3aDX LqI25gg3rr2PjS9NAUWQpaRoHx3jLAQfWWTXmasL7D5ZnbA0ELE6m/F68RfCp10PCdD3 SfKg== X-Gm-Message-State: ALKqPwfOFB479yYBjDLwUA5pPPS/JmWipXtPHqxIV5VFe2R3SwOzJAQi FsMWD7cBVK42kjmYuN9FabCUBeo2SP9hYzseQhesQQ== X-Google-Smtp-Source: ADUXVKJ7SpkFdKLiHLvTGw1tAU6xPurnKzglQYmewLQiau2yU5hkLX6wOPqKsajvyYufys25Ep5cikuo+w5XcgJW/uQ= X-Received: by 2002:a9d:2625:: with SMTP id a34-v6mr1252215otb.308.1527246397874; Fri, 25 May 2018 04:06:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:40d3:0:0:0:0:0 with HTTP; Fri, 25 May 2018 04:06:17 -0700 (PDT) In-Reply-To: <1527086545-68024-8-git-send-email-mst@redhat.com> References: <1527086545-68024-1-git-send-email-mst@redhat.com> <1527086545-68024-8-git-send-email-mst@redhat.com> From: Peter Maydell Date: Fri, 25 May 2018 12:06:17 +0100 Message-ID: Subject: Re: [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h To: "Michael S. Tsirkin" Cc: QEMU Developers , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum , Marcelo Tosatti , kvm-devel Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 23 May 2018 at 15:43, Michael S. Tsirkin wrote: > Switch to the header we imported from Linux, > this allows us to drop a hack in kvm_i386.h. > More code will be dropped in the next patch. > > Signed-off-by: Michael S. Tsirkin > --- a/target/i386/cpu.h > +++ b/target/i386/cpu.h > @@ -688,8 +688,6 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS]; > #define CPUID_7_0_EDX_SPEC_CTRL (1U << 26) /* Speculation Control */ > #define CPUID_7_0_EDX_SPEC_CTRL_SSBD (1U << 31) /* Speculative Store Bypass Disable */ > > -#define KVM_HINTS_DEDICATED (1U << 0) > - > #define CPUID_8000_0008_EBX_IBPB (1U << 12) /* Indirect Branch Prediction Barrier */ > > #define CPUID_XSAVE_XSAVEOPT (1U << 0) Hi -- this seems like it will break compilation when we next update our copy of the Linux kernel headers, because (as of 4.17-rc6, at least), asm-x86/kvm_para.h doesn't define KVM_HINTS_DEDICATED. Here's the diff I get as part of my attempt to run update-linux-headers: I'm not sure what's going on here -- commit 633711e8287 in the kernel just renames the constant, but doesn't that break userspace API ? thanks -- PMM --- a/include/standard-headers/asm-x86/kvm_para.h +++ b/include/standard-headers/asm-x86/kvm_para.h @@ -29,7 +29,7 @@ #define KVM_FEATURE_PV_TLB_FLUSH 9 #define KVM_FEATURE_ASYNC_PF_VMEXIT 10 -#define KVM_HINTS_DEDICATED 0 +#define KVM_HINTS_REALTIME 0 /* The last 8 bits are used to indicate how to interpret the flags field * in pvclock structure. If no bits are set, all flags are ignored.