From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B0FDC433DB for ; Wed, 3 Feb 2021 08:06:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1116664F4B for ; Wed, 3 Feb 2021 08:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232589AbhBCIGL (ORCPT ); Wed, 3 Feb 2021 03:06:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39916 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232474AbhBCIGI (ORCPT ); Wed, 3 Feb 2021 03:06:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612339482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+oG1iepI5e+YoRSW15dR/Lg6jPhIDaE96zUxkSlCngY=; b=OcYuoymMmPzvZXB9CsrD2Dtumsbz6uzxWN+NAMZ0pSwW6spKmv1snEhYwEIkKUJPyDl4xB S11xf7nYA8sQVXLDVLDsq3UVw2uLJqSt5L+euPu8iq240kHsEYeOnfcu2skQcuSf6wiB1u OLjXgJ9LwRWwMBefsAG0sR6qbe1eWSM= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-ySLSXRxYMRqi7iuqwo9-oQ-1; Wed, 03 Feb 2021 03:04:40 -0500 X-MC-Unique: ySLSXRxYMRqi7iuqwo9-oQ-1 Received: by mail-ej1-f71.google.com with SMTP id eb5so1835352ejc.6 for ; Wed, 03 Feb 2021 00:04:40 -0800 (PST) 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+oG1iepI5e+YoRSW15dR/Lg6jPhIDaE96zUxkSlCngY=; b=Epd+6M5+RLhAv5N8JyaCeBJHodpGlEL6eFSajOeXrhbtRTR8fHLjKuMRoTFLsah9b+ FtS8f6u8uMfaEPcKO/bNkUcfHuns0UAKioSlVqNjLsqt4r2+SiwQh30o85+Kl5EsiJZT +g/fH9r6D43aZwQKvFJHZxvlb96eb5b/7Mpr+WSByYvYMlsxOVUPIJ/NGfCiE45Lh2Wq qSXtU0jOrSvzUEjblye2O8ZcP/w4tli0EcXVgwBoR0WVbe4jhTUGBJJFlRybpYaRK/d3 pSznmDDtJ7cL7MSoXaE/bFjCJr6pFs7OJBgwNwmX0xEfvUFX7vty5HXtdlpLms8L+JuB 6VMA== X-Gm-Message-State: AOAM531PRdFTzUYjCNtl5zkpfzilt5Zjz0+0H3hQAiwC1JFgjl8Bm/g1 BzuvguyQUzmEc1Q8b80hQp5W3pju94v9xqbrSvqMa/CA4KKQnwJuhE2XfGDDvHLwBK5t1kvo7sL iWkjBo87liL0165AGD6SIipBt X-Received: by 2002:a17:906:9249:: with SMTP id c9mr2055019ejx.416.1612339479659; Wed, 03 Feb 2021 00:04:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9ieYS7R8bKJ//fPnjyvJXLt8OWDR0VRxfS3newcnOgK3FN3F9pIY3diGwH0IR9kZERgI0pA== X-Received: by 2002:a17:906:9249:: with SMTP id c9mr2054998ejx.416.1612339479416; Wed, 03 Feb 2021 00:04:39 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o11sm483181eds.19.2021.02.03.00.04.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Feb 2021 00:04:38 -0800 (PST) Subject: Re: [PATCH v4 1/3] KVM: SVM: use vmsave/vmload for saving/restoring additional host state To: Sean Christopherson , Michael Roth Cc: kvm@vger.kernel.org, Andy Lutomirski , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Tom Lendacky References: <20210202190126.2185715-1-michael.roth@amd.com> <20210202190126.2185715-2-michael.roth@amd.com> From: Paolo Bonzini Message-ID: <509b0e43-7f15-53bc-ab08-e27edbb855f8@redhat.com> Date: Wed, 3 Feb 2021 09:04:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/21 01:38, Sean Christopherson wrote: >> >> +static inline void vmload(hpa_t pa) > This needs to be 'unsigned long', using 'hpa_t' in vmsave() is wrong as the > instructions consume rAX based on effective address. I wrote the function > comment for the vmsave() fix so that it applies to both VMSAVE and VMLOAD, > so this can be a simple fixup on application (assuming v5 isn't needed for > other reasons). > > https://lkml.kernel.org/r/20210202223416.2702336-1-seanjc@google.com > Yup, fixed. Paolo