[{"id":1760732,"web_url":"http://patchwork.ozlabs.org/comment/1760732/","msgid":"<20170831081256.GE13619@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-08-31T08:12:56","subject":"Re: [Qemu-devel] [PATCH v2 09/13] hvf: refactor cpuid code","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Wed, Aug 30, 2017 at 03:26:58AM -0500, Sergio Andres Gomez Del Real wrote:\n> @@ -613,6 +614,15 @@ static uint32_t xsave_area_size(uint64_t mask)\n>      return ret;\n>  }\n>  \n> +static inline bool accel_uses_host_cpuid(void)\n> +{\n> +    if (kvm_enabled() || hvf_enabled()) {\n> +        return true;\n> +    } else {\n> +        return false;\n> +    }\n\nShorter equivalent:\n\n  return kvm_enabled() || hvf_enabled();\n\n> @@ -2396,6 +2427,7 @@ static void x86_cpu_load_def(X86CPU *cpu, X86CPUDefinition *def, Error **errp)\n>      }\n>  \n>      /* Special cases not set in the X86CPUDefinition structs: */\n> +    /* TODO: implement for hvf */\n\nThis patch has several todos.  What is missing?  What is the impact of\nsilently skipping this for hvf?","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"vaoxW3nU\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjZrS2L2mz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 18:13:27 +1000 (AEST)","from localhost ([::1]:54435 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnKbM-00025O-KK\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 04:13:24 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40799)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dnKb1-00023k-LL\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 04:13:05 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dnKax-00027R-M2\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 04:13:03 -0400","from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:36424)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <stefanha@gmail.com>) id 1dnKax-000279-Eh\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 04:12:59 -0400","by mail-wr0-x244.google.com with SMTP id 40so5212873wrv.3\n\tfor <qemu-devel@nongnu.org>; Thu, 31 Aug 2017 01:12:59 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\tw10sm5863966wra.47.2017.08.31.01.12.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 31 Aug 2017 01:12:57 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=srD7Rx6jPMXByvG9BWDx/tzvdyXdGBVI/YsnfEvcbeQ=;\n\tb=vaoxW3nUwA8qgMw/KnDAGPjJKlK7xdkXx4oulY09E7xgDuzKCdPewQH1Ome+hoVpPs\n\tX0syB7dATroEv3cbUOOfa1RpD5XHOl8gPp5aHisrGFJmWm0+VaEqdN8Om9kWfWLOvWYl\n\tvQn9+70fa1cKyOdvstdFtgYg779RGAXAXVu1EL+yfXKl8PcGFNuNiRD5/akLnJjPV99c\n\t3M76gD0awo8WJCD5bmZ/wLbHnyrnv+MNrC+f2dfiWyUMoCjdYIt3cd8Tn+cMjO5vNoi+\n\tiMSVb/K7KzCLNaSf4tUrzn62k08d+F4Ru9eitG0gsnGQlhBxJ0HQ9etSXw5/uMNy9Bv5\n\tO8Og==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=srD7Rx6jPMXByvG9BWDx/tzvdyXdGBVI/YsnfEvcbeQ=;\n\tb=t9ekFdCjgNUmXquOtOINSDJsQq3NUwTcx10LWkon3n/jJxEp4YsA1CJodX+YTQncfk\n\trLTfBRle8HXnukU0JURha3teJ25QDfi4CDpk3DO9H9fo3LltoygpuxJB32HNmn8AK0tw\n\twN+KZp48LGEBxJYULuGmTFVFcVSmN2qSRUYqHUT4mgX0NMDPmYcpx2JX52HyPIktgTxq\n\t3AzDSLCGZYMPz6mLB0xCeVb2xeB8KDYGj5d285gN8IIa373nCRq17/LW4NHLtjfTlQBC\n\tZ8EhB7unLZW/lYvW4xExAt8wcUXTBy792dH9oy9If8NBdvQRGGcGlMoX20dZ50tbxxDZ\n\t+UNw==","X-Gm-Message-State":"AHYfb5h8C2CZS+IaSTUw/kVHnVoA5kQYSt5UR/jpq71RMvC3wcKDIIL3\n\t6uuqOg/XO4SRgw==","X-Received":"by 10.223.168.104 with SMTP id l95mr2460813wrc.219.1504167178482;\n\tThu, 31 Aug 2017 01:12:58 -0700 (PDT)","Date":"Thu, 31 Aug 2017 09:12:56 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Sergio Andres Gomez Del Real <sergio.g.delreal@gmail.com>","Message-ID":"<20170831081256.GE13619@stefanha-x1.localdomain>","References":"<20170830082702.3011-1-Sergio.G.DelReal@gmail.com>\n\t<20170830082702.3011-10-Sergio.G.DelReal@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170830082702.3011-10-Sergio.G.DelReal@gmail.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c0c::244","Subject":"Re: [Qemu-devel] [PATCH v2 09/13] hvf: refactor cpuid code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]