From patchwork Mon Jan 8 21:51:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vincent Bernat X-Patchwork-Id: 10150659 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 6E5A0602CA for ; Mon, 8 Jan 2018 21:53:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 672CD2870B for ; Mon, 8 Jan 2018 21:53:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BF462875A; Mon, 8 Jan 2018 21:53:05 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3DE3C2870B for ; Mon, 8 Jan 2018 21:53:04 +0000 (UTC) Received: from localhost ([::1]:33149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYfLr-0003rF-IZ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 08 Jan 2018 16:53:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYfKl-0002uf-QG for qemu-devel@nongnu.org; Mon, 08 Jan 2018 16:51:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYfKi-0004ak-MO for qemu-devel@nongnu.org; Mon, 08 Jan 2018 16:51:55 -0500 Received: from bart.luffy.cx ([78.47.78.131]:47774) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYfKi-0004Xy-7l for qemu-devel@nongnu.org; Mon, 08 Jan 2018 16:51:52 -0500 Received: from bart.luffy.cx (localhost [127.0.0.1]) by bart.luffy.cx (Postfix) with ESMTP id 609EA15358; Mon, 8 Jan 2018 22:51:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bernat.im; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=postfix; bh=Qpip7uLOyiLt0p5qkP3+sMoyOds=; b=pWH k620bsijyfzNKGYL1ZRat89oHHLjqYTyiBERaB188Gn0WVnRXLHSMERIWyektW9U 0TTgBzySZIPh65uSvWcx5KNWLkhzRq4Cd3mQYb25tVoo+B54dtRAACSPPub3reG/ UZwqrEpCCfCWZaK6rbesQeYxwt/t/SbgvC2M6haQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bernat.im; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=postfix; b=gomVe9JzPXx3rqxaK5tXTYviXzUOR 3dbbLTpK+4zkqDD30IkNR9LX48guAoDL4extn0/A2hc4HSchtXIC9NVUxMFncEQk I0KSTNYttezbW6CWyBYHl7ktVRDzaLb0OUKeKKJggvn/pLHInGNZqlNFOof66fhX jiN2Gb6iQ3504c= Received: from neo.luffy.cx (184.66.60.188.dynamic.wline.res.cust.swisscom.ch [188.60.66.184]) by bart.luffy.cx (Postfix) with ESMTPS id 3F8B415357; Mon, 8 Jan 2018 22:51:49 +0100 (CET) Received: by neo.luffy.cx (Postfix, from userid 500) id C91A82166; Mon, 8 Jan 2018 22:51:48 +0100 (CET) From: Vincent Bernat To: Eduardo Habkost References: <20180108205052.24385-1-vincent@bernat.im> <20180108211623.GJ6646@localhost.localdomain> Date: Mon, 08 Jan 2018 22:51:48 +0100 In-Reply-To: <20180108211623.GJ6646@localhost.localdomain> (Eduardo Habkost's message of "Mon, 8 Jan 2018 19:16:23 -0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 78.47.78.131 Subject: Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-devel@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP ❦ 8 janvier 2018 19:16 -0200, Eduardo Habkost  : > One possible way to work around this problem is to declare that > QEMU 2.12 with KVM will require Linux v3.6 and newer (because we > need Linux kernel commit ad756a1603c5 "KVM: VMX: Implement > PCID/INVPCID for guests with EPT"). I have proposed something > similar to allow us to enable kvm_pv_eoi by default, some time > ago: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg486559.html > ("qemu-doc: Document minimum kernel version for KVM in x86_64"). I don't see a way to probe KVM to know what's supported, so yes. Should I add a paragraph similar to yours or would your patch be merged soon? What are the consequences of running a too old kernel? Would KVM just hide PCID flag? > Second, we need compatibility entries setting pcid=off on > PC_COMPAT_2_10 so we don't break compatibility on older > machine-types. I'll resend a proper patch once the first point is cleared. diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 6f77eb066587..da5bd8304eb0 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -327,6 +327,14 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = TYPE_X86_CPU,\ .property = "x-hv-max-vps",\ .value = "0x40",\ + },{\ + .driver = "SandyBridge-" TYPE_X86_CPU,\ + .property = "pcid",\ + .value = "off",\ + },{\ + .driver = "IvyBridge-" TYPE_X86_CPU,\ + .property = "pcid",\ + .value = "off",\ },{\ .driver = "i440FX-pcihost",\ .property = "x-pci-hole64-fix",\