Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5011475pxj; Wed, 26 May 2021 00:09:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu4xVXX9mNdyFNKJFRQdfzBUZXPxze6rkyzdV+ilCN9n4M5N/lN7GWdzsPxEfquX4if5zE X-Received: by 2002:a17:906:f84:: with SMTP id q4mr33028430ejj.442.1622012942836; Wed, 26 May 2021 00:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622012942; cv=none; d=google.com; s=arc-20160816; b=E3VViZwUVKugHBHJnit2rafQO1SWiS+6Opurk3fNaXtxoCOyoYt4BZRHz/KOs7LgB6 jnpo55b+2O+ri8hJ52b7ly9xj9pERTWy3QQ8VyC8Em/lDROgyEwWieLt/nNXfPE6cLpo srahZ1EgtamCXZ29DP8MfsYQyOar4QasTYyiYP8u60MGkGrcb6xMeJqOK3uoNI2Oqv6P tb6SNcOauNqgidStomiM/Lc9taVr3fBg/rJhFI1A49dJ7CJk7ZIQelRUWr659HJ5KbL8 KdK+1qdclx9vSjo2ZoFuudyiGwG4GZzHx8BAvn9ZUvuZRXPvv88q9VoglbG5nmYfBqYR kq+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EevI1c6qRbZj+y9bbUbJzhVFurpZDDjFQ+WN5cz9y04=; b=e78YLLho5/BZV7rRmcmtmkpJwpQJjgZAXkSkmF+Pb5YPn8FC6BAHk1zkLZaKAZY/sO puTq4BkKaShmYs2jzO0MfupO2jcUgbAAJQj+XgDW2nT+FmQQk833Ukx/Fl730eTYacZP vzos4JJB8MZ5snrpDzpIYZHh0OOl5wLbU7WNhvlazGdDSCvCmkTSwWwOYsuL+AJ8J+56 NZVSUCwrLtMP1JbOv44+5TyZ7FrjPNQAL79ElaNAjcOXzhVC1WPfwZvjKyPJ6cyjQjt1 QpWVy5Pf34MSIMS8dCGF00VNIts5GOFuY7yWYUJsTmjMxYis056fLQVFV5CjWVgKmjgm LMzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="F/Vi57cL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si18437179edi.355.2021.05.26.00.08.38; Wed, 26 May 2021 00:09:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="F/Vi57cL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbhEZHHM (ORCPT + 99 others); Wed, 26 May 2021 03:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232952AbhEZHHA (ORCPT ); Wed, 26 May 2021 03:07:00 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BA72C061760 for ; Wed, 26 May 2021 00:05:06 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id q6so305085pjj.2 for ; Wed, 26 May 2021 00:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EevI1c6qRbZj+y9bbUbJzhVFurpZDDjFQ+WN5cz9y04=; b=F/Vi57cLNtlTe5mxb8DolsWxh1wOFR2bGcVCHhFvsR+hI163XZP+/Q8S1lfnPgW88J Tt83GE5VRR5iPMRGftUC1ESXPzHxPQ75zXneJaXO5xt75t7kl0GQ8g7RI3tb5HUUOQbM kOwcsBsz5ux+PKXxaU1xNLfEpBNDQuHVbB+xmNtSpCJ7WpkLBwXWG95/Uk3y1kxFWB7P x5wDZhsRJlppXpoWr00jNBoMaBTrEJNG/140hcIjvVVycu/vEr0TMzcQDE4MH3i6PUkp H3BprMgnOFB2hsjdDD0WNVAucuWXZBdv4tjN2L9pwKjBhVndUTep+ZVzRza2T48G9lFA IIjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EevI1c6qRbZj+y9bbUbJzhVFurpZDDjFQ+WN5cz9y04=; b=JXRcanmo88tPZGL+WBMFrZBT9H7qzNKV1S4H57oZPk1TUSqdMXTbVtc6xwv0KfAweN vJ/tN5TmwYJxGI9I+WnQL2/mEMSgeVHfUmEaa2JLHGIvanQpX6ZTiZIFex2hjBRJlHP+ y/1BNQ7asxk8m2F1EjzwfMcSac5CHzrIfHyBfN8CD3gjNH/BES78I15MthkBMxYc0SrZ ZcukB6D3e6X3BcOQ+to5K9XZ+8SwMcMoLHfjLVCa0H0YXoFn5vq4ugZg+os+yKVXtFKI 994mbnJqurFTZuq7QQgu2nWjcF37/XhloQ47CZDEoAaKHD2WpSwW5+OPtJ6cXnm0sc1I 3QKg== X-Gm-Message-State: AOAM531S2y+6NfLbwsRoypz3wEsZmSHGvH+2MrLctkiTfOOOQJ0Fwo6K d9WzYpq/6QQ/7juUWsmdi8hhYEDa5XeZX+Y6dwbd5A== X-Received: by 2002:a17:902:f20c:b029:f0:af3d:c5d8 with SMTP id m12-20020a170902f20cb02900f0af3dc5d8mr34045316plc.23.1622012705860; Wed, 26 May 2021 00:05:05 -0700 (PDT) MIME-Version: 1.0 References: <20210424004645.3950558-1-seanjc@google.com> <20210424004645.3950558-19-seanjc@google.com> In-Reply-To: <20210424004645.3950558-19-seanjc@google.com> From: Reiji Watanabe Date: Wed, 26 May 2021 00:04:50 -0700 Message-ID: Subject: Re: [PATCH 18/43] KVM: x86: Consolidate APIC base RESET initialization code To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 23, 2021 at 5:51 PM Sean Christopherson wrote: > > Consolidate the APIC base RESET logic, which is currently spread out > across both x86 and vendor code. For an in-kernel APIC, the vendor code > is redundant. But for a userspace APIC, KVM relies on the vendor code > to initialize vcpu->arch.apic_base. Hoist the vcpu->arch.apic_base > initialization above the !apic check so that it applies to both flavors > of APIC emulation, and delete the vendor code. > > Signed-off-by: Sean Christopherson Reviewed-by: Reiji Watanabe