Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3725795imm; Mon, 30 Jul 2018 02:15:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJWV2EESrPUVFel9a6YNC65dilzYuqbkMPuZu1D2HvkN0SvIenkHb6239LuVdsiLTyEYxR X-Received: by 2002:a63:743:: with SMTP id 64-v6mr16119701pgh.216.1532942158535; Mon, 30 Jul 2018 02:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532942158; cv=none; d=google.com; s=arc-20160816; b=dQV3rZbkWQV6u1mZUeZfEfag2gByjeVmUbnnbpLfCRw8oRczVgcRgyp8FX8JoN7WxU 7Ss2A9CJOge7a6LO2kpUZ0lJXXjp3us2lFT+J7Ovtktxl8ZRFSzJltHelXmvRUqT5RR3 H6EijJVQ9tL0dVTcqBsWsud7htb58dpi7aZU9KKJkDFOf+w+M3C33Vlrnqdvoix6+L3z MGOIzo9bGcVylri9RwjBIPdDkOaLgV5eBNqywfiAV0PQBAW8XXDQ84inhCsd+JH6FD6Q k3IXTJl4JIHDS4Cug4OcBxEqjkb+kajIARQyJsZpv3L2QXWfMmZBsbqqkDKB4P42889m l63A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=SH22xKBrJNX8xGwB1MKecnbcDrGtcC/4vevZrL11M6E=; b=zTjmxiZ2vBgY98nSvcEfjR8w4BwxnvjfNFwaJ0ctJYZ//WKuOtuHxz8aT0tKwcqGD7 ZBgUw5kKCz+qkUpsFTCZ2K8Jr7jJgu8NkEqFBde3ZrsVsxy1wq1HlXOV6wagDOZKRmaL AwcYnYsDcX6v5Nc+RPDKOcCe6Hy63L5e38ZvW8hmoyqI/O4pI3Z81d/FPBhtjKxPeW1T FbAirIlA9mpMGHrGxxgWeXo6juI5xTIqrtYBgrd9VQxI9ki7a2QlbE33lzdPjidJAW4/ k6rWF31rDA4BQGo5lrW+4FgHEugzsfGFkG2lWQRpGAHxuFJLbHHaPvYQ4ymrNCYxh5dV OqXw== 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 n34-v6si10767466pgm.28.2018.07.30.02.15.43; Mon, 30 Jul 2018 02:15:58 -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 S1726685AbeG3KtA (ORCPT + 99 others); Mon, 30 Jul 2018 06:49:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57700 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726561AbeG3Ks7 (ORCPT ); Mon, 30 Jul 2018 06:48:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 17B497C6A9; Mon, 30 Jul 2018 09:14:57 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB3662026D68; Mon, 30 Jul 2018 09:14:55 +0000 (UTC) From: Vitaly Kuznetsov To: Paolo Bonzini Cc: Jim Mattson , kvm list , Radim =?utf-8?B?S3LEjW3DocWZ?= , the arch/x86 maintainers , LKML Subject: Re: [PATCH RFC] x86/kvm/lapic: always disable MMIO interface in x2APIC mode References: <20180727144448.9606-1-vkuznets@redhat.com> Date: Mon, 30 Jul 2018 11:14:54 +0200 In-Reply-To: (Paolo Bonzini's message of "Fri, 27 Jul 2018 19:00:38 +0200") Message-ID: <87sh41nkz5.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 30 Jul 2018 09:14:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 30 Jul 2018 09:14:57 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paolo Bonzini writes: > On 27/07/2018 18:48, Jim Mattson wrote: >> On a physical machine, I would expect the default local APIC page to >> fall in the PCI hole, so it would be correct to sink writes and to >> return all ones for reads. Does qemu implement a PCI hole, and does >> this address fall into it? > > It does implement a PCI hole, but when using the kernel LAPIC it expects > that only devices write to that range; therefore that address doesn't > fall into the PCI hole, and instead it generates an MSIs. Yes, and that's why I believe it's correct to never forward lapic reads/writes from KVM to userspace when lapic is in kernel. "RFC" was mostly about the inconsistency with the case when APIC access page is in use. To be 100% correct I would suggest to somehow make it behave like MMIO hole in case we're in x2APIC/disabled mode too. -- Vitaly