Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp778028ybp; Wed, 9 Oct 2019 04:12:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMgdTkBFdIlyvySGwuZqX4Jv2xBA/F3v1HE46dVZfZ60b1oGPwc70D/YKG5WLEsuKSe5j2 X-Received: by 2002:a17:906:6bd5:: with SMTP id t21mr2154830ejs.277.1570619542258; Wed, 09 Oct 2019 04:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570619542; cv=none; d=google.com; s=arc-20160816; b=LiFCPWgtD0adTR8YPENOrKpBwD9fobltH9A3nT8ZiEJM3rgPk2ANRP+0c3WFZ/Wo+a VlKtN1n6F4xKOQPQH6AmswcF7z1Cq/zQ6iKAQJsCZnbm+2L4cyJQ9+rPBRJo9GqOd1Lp KJPqVrVPGZuJQD1X4KPkG91fgGygc6+zTk7nKHQLFPSRY62R182dprsoYAobCdzBZ+pn Lx5cblg5xV1hBKG86wso73xAcI/xEr40YZ47uz5rQv72uOdZ/H2ISey+9bAo0x+WN9yR CfW9UZtLVe8dG6aREJJJZniP9/OkSlrYD9IVwJ4/DIBHSNLqcNB3stN3fr9BHmZmVGQ7 hfXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=jGWgKZBUMvfPdzfHcqjjwuG5He2iv9Vy4sHR01HU1S8=; b=xzzjStsj1dHisbWEaPXIYDGLIxA0MHRa1FsdRTpbETWIaX6/gkHfVh/SRKcYpXTlbW c7YrglXA8SwD7aXSxQytfDjzhm5zpJBds+72QTE8b9N76yQHWOiw5S0E1gsg0wUaGFrn MoTmDFWxW3W/U8MgyeiT15zVOdUqEs0nzNeDVQ/UnlQFJ3JkYFGdAkirkT+BPIuAE11e Nm7yPB46j2KN6uImX9yjnRZjJOVfl7dHtNaIV2bi8exjehdYvAaUu8zw7QG2Q8JrZLTx bdPzn3AFexW1Sks41gPrk9FzPIv2v6nEjO3flIbisjE/jKX0X4flLX7pCdeevQjeNOmo Ujjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si987056edy.417.2019.10.09.04.11.58; Wed, 09 Oct 2019 04:12:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730252AbfJILL2 (ORCPT + 99 others); Wed, 9 Oct 2019 07:11:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34496 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbfJILL2 (ORCPT ); Wed, 9 Oct 2019 07:11:28 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18F812A09CC for ; Wed, 9 Oct 2019 11:11:28 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id l3so896079wmf.8 for ; Wed, 09 Oct 2019 04:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jGWgKZBUMvfPdzfHcqjjwuG5He2iv9Vy4sHR01HU1S8=; b=Dsd7pHyEnOIa8e+up05cQf3xSgmcgzVqwe1Vy3unMvGmzhQW4t31Ver/IHmF3JhTDj +VApgatmdcQ/FNKBTJHPw4sIHBU17RiBTw05r/Q2dkeSNvFIL+Zm5Wk///6x7XlXEkXk Notw9qYmLRL5kC3WcRwj+Uqwv5T0D8klD3rVBbhv1X9w+s4xg/j+lnTQA++UrzXHy1kZ 2j8QuVcfX1+Bw6ka52Urj+ugc/uO+J8fNBlSd/fn6Di9y40hc48en84rGrcm7hYjD6t+ d2yGDNXZEEgs7X0R7vlMQz9UpR0oToOvC0CliAwUKZndkuzQa3YXfGR1gJteXedYXod7 cCLg== X-Gm-Message-State: APjAAAWVmhy6QcmeqSLNoRFkrGrc211vPq4gvsIaFsLctGJOJrG6w4kI 26GyTz1ehqOWOZgGtP2lwrXgJAUqrt2W1Tn/X9mEZVYOaiAL1daFI3JCO55W6Lc+gE4E5ozBtgX tJSjPexgURZcZshe3A41cb1kd X-Received: by 2002:adf:a50b:: with SMTP id i11mr2567244wrb.308.1570619486789; Wed, 09 Oct 2019 04:11:26 -0700 (PDT) X-Received: by 2002:adf:a50b:: with SMTP id i11mr2567234wrb.308.1570619486543; Wed, 09 Oct 2019 04:11:26 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id 36sm2872921wrp.30.2019.10.09.04.11.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2019 04:11:26 -0700 (PDT) Subject: Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs To: Vitaly Kuznetsov , Sean Christopherson Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Jim Mattson References: <20191008180808.14181-1-vkuznets@redhat.com> <20191008183634.GF14020@linux.intel.com> <87d0f6yzd3.fsf@vitty.brq.redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <5b1b95e5-4836-ab55-fe4d-e9cc78a7a95e@redhat.com> Date: Wed, 9 Oct 2019 13:11:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <87d0f6yzd3.fsf@vitty.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/10/19 12:42, Vitaly Kuznetsov wrote: > Paolo Bonzini writes: >> There is no practical difference with Vitaly's patch. The first >> _vcpu_run has no pre-/post-conditions on the value of %rbx: > > I think what Sean was suggesting is to prevent GCC from inserting > anything (and thus clobbering RBX) between the call to guest_call() and > the beginning of 'asm volatile' block by calling *inside* 'asm volatile' > block instead. Yes, but there is no way that clobbering RBX will break the test, because RBX is not initialized until after the first _vcpu_run succeeds. Paolo