Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3382370pxu; Mon, 19 Oct 2020 10:37:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuUBoLVM5/7qx7mtMxczdF2SM63ZW74uqyqGuSA+Xv2tTW7LwV/EpN3bNYt9ZVm6//QoeM X-Received: by 2002:aa7:c3cf:: with SMTP id l15mr952878edr.314.1603129072006; Mon, 19 Oct 2020 10:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603129071; cv=none; d=google.com; s=arc-20160816; b=MBvkyl9rkSDz2UbUWT0OOzr0/AR7Zp22UR5xXQUQNV3PUGzfE344rNOYXjSDkAR2DC /GJxO371JZOfC2k1uRy0dOm02BaNs4e93TZcVRlqYAd51INpd9B+c4801g4hG35APva/ w27C7UqvRL6WyzDPtzX7UToQeBejCPFXsVRr7LHzx5genJwoGP1+AhBOGyle+pR1VE45 UgMGhTKQj7bSCCPc3JPdTD/qaY+s9SOpu7cfOiq2/7gZoluGFKAkWLO5Va8wJwnyf8D6 icFpFXgOL87n7POq8v/KG/WosXj2MkJaNDSf1cHyt2OrWj0oPX6G1ZePZFeLroXhtnko asQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/RufWKnLZUskTlxf1MZpvMgrqUwpnS/7Ou19TQ6qNrc=; b=yqOcCLd9jIPf+T+7jS4HGPoRaC/l0taY1oVR6rZQRPfFZEM0hwG+6I28tvnA/PR0q1 Tcz0eoApcmmh3JWgDM7GBpWKqIJEv2SY4W9j2A2I1PIcUx733ke0FwLSB9N1PFpYiVF3 1IgcWyuzbqrbzFhre8vHMRe1/AEg7VMzG0dZ9wAqpGwNbnsaLDqr4QDkOAC3tzVeFd8H /X6NoWM6TQpHE9dmNhgmDbFzDCuubxIk7bh1yhTWhfORWlLb8Fm+S26AyDqp+ZyjhjTH WpyKqRIKfPJtONvBWT3/n2SHT4t9T6xd2x7ZlR5Kq4x5g21CGWRaDck/MjlG9Rtt/5hR 2cQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cm+rYkH0; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si421287ejj.113.2020.10.19.10.37.30; Mon, 19 Oct 2020 10:37:51 -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=@redhat.com header.s=mimecast20190719 header.b=Cm+rYkH0; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727689AbgJSRfy (ORCPT + 99 others); Mon, 19 Oct 2020 13:35:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49172 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbgJSRfy (ORCPT ); Mon, 19 Oct 2020 13:35:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603128953; 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: in-reply-to:in-reply-to:references:references; bh=/RufWKnLZUskTlxf1MZpvMgrqUwpnS/7Ou19TQ6qNrc=; b=Cm+rYkH0hcRUzMrzyl+1sKfhFmvhOAZM1KF6DXXXeFsnhqlgj1rnGHkVLFfhwczWbw/FsF pNOBSKbaqSAxD2T3e+zckQMT7Iss+79H4mbgYtReGyEVP+nwxJwSd0X+c7xbuCbOF6L3hd LZgSM6UzRT8QbudsvtncognpO/Ydu+s= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-520-vaFIPHY_P4iPFjK83gmjXg-1; Mon, 19 Oct 2020 13:35:50 -0400 X-MC-Unique: vaFIPHY_P4iPFjK83gmjXg-1 Received: by mail-il1-f199.google.com with SMTP id p17so688337ilb.5 for ; Mon, 19 Oct 2020 10:35:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/RufWKnLZUskTlxf1MZpvMgrqUwpnS/7Ou19TQ6qNrc=; b=LOrK8VXVBwfjVHIEnSaC6jvuvxmbGbJRl1n7C7WKq/Y8yoU4OANrK8j3jJHYZ6iXsK ZhJbe8x2V6Bk4Y96FkpW86DBcEQvOJxLqSLnqxkc8EDNXsn3/Nb9/zs9jUUmQSxZE02Q /Jh+3CIM9qwUed1q3lw6x1lg8DFjfB9BGrDWiI6EsmjnpnweTlrqPRjrz19+6aEUmx9X WMLqUMymKEYRArIaR6SWSHTHgLw9Anjd+t2mK+sZfYHrFYA6AYRC1Q2Cp8/7n98faebQ nB8Wkf4CF3eZ8D25JjBlhsc6w53HRR7E8xiP9GtF1XxOu2pTN4TknYcA9zz9zy+dOEqx MHjA== X-Gm-Message-State: AOAM53149wvJeoWDDe6ZeRoOkSLCXQ8hnfNSAD/ssalczD/BR4OeHURr X+ZEYQR2WEv0hjRQ0gbDSajHe5G9MHxl03RNHFD/1lLn6j++Cxtttr3iiP761frhQ8A/Plplrgz s8YhrbCQV5VsmwjLelQfBMz2X X-Received: by 2002:a6b:cd83:: with SMTP id d125mr449086iog.174.1603128950133; Mon, 19 Oct 2020 10:35:50 -0700 (PDT) X-Received: by 2002:a6b:cd83:: with SMTP id d125mr449059iog.174.1603128949880; Mon, 19 Oct 2020 10:35:49 -0700 (PDT) Received: from xz-x1 (toroon474qw-lp140-04-174-95-215-133.dsl.bell.ca. [174.95.215.133]) by smtp.gmail.com with ESMTPSA id g185sm367924ilh.35.2020.10.19.10.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 10:35:49 -0700 (PDT) Date: Mon, 19 Oct 2020 13:35:47 -0400 From: Peter Xu To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Alexander Graf , Aaron Lewis , Sean Christopherson Subject: Re: [PATCH] KVM: VMX: Forbid userspace MSR filters for x2APIC Message-ID: <20201019173547.GB3203@xz-x1> References: <20201019170519.1855564-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201019170519.1855564-1-pbonzini@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2020 at 01:05:19PM -0400, Paolo Bonzini wrote: > Allowing userspace to intercept reads to x2APIC MSRs when APICV is > fully enabled for the guest simply can't work. But more in general, > if the LAPIC is in-kernel, allowing accessed by userspace would be very > confusing. If userspace wants to intercept x2APIC MSRs, then it should > first disable in-kernel APIC. > > We could in principle allow userspace to intercept reads and writes to TPR, > and writes to EOI and SELF_IPI, but while that could be made it work, it > would still be silly. > > Cc: Alexander Graf > Cc: Aaron Lewis > Cc: Peter Xu > Cc: Sean Christopherson > Signed-off-by: Paolo Bonzini Acked-by: Peter Xu -- Peter Xu