From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 97EE1D8019A for ; Wed, 24 Jan 2024 13:27:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Kf1KSRqpiiIzCStDF7tObKuwh+Xyv0leRcd2KGzyF0k=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1706102823; v=1; b=XtGU9c8smckGJwxH43as/9kxppahX5YRlr+tuZ1N1vdrqeVKAvmccF/ETpJ4WL+PxdwfgK// 9q5B3qNavTnKt1ljHmPqYOmHm0GA8TylD0XCsSlmfdhjjy6XFUCVhIHKgbIaqPsPfOe4vD3uzk/ 8RgbOOqRnZXzjj5i29qAkD20= X-Received: by 127.0.0.2 with SMTP id jxFYYY7687511x5a2yvK347f; Wed, 24 Jan 2024 05:27:03 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.22353.1706102822452695694 for ; Wed, 24 Jan 2024 05:27:02 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-558-q2dEZOImNPuxCOzNTR9DuA-1; Wed, 24 Jan 2024 08:26:58 -0500 X-MC-Unique: q2dEZOImNPuxCOzNTR9DuA-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E61F3837224; Wed, 24 Jan 2024 13:26:57 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3CBA1ABFC; Wed, 24 Jan 2024 13:26:57 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0E29A180038B; Wed, 24 Jan 2024 14:26:56 +0100 (CET) Date: Wed, 24 Jan 2024 14:26:56 +0100 From: "Gerd Hoffmann" To: Laszlo Ersek Cc: devel@edk2.groups.io, "Brian J. Johnson" , "West, Catharine" , "Xu, Min M" , "Ni, Ray" , "Wu, MingliangX" , "Yao, Jiewen" , "Xue, Shengfeng" , "Dong, Eric" , "Kumar, Rahul R" , "De, Debkumar" Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0 Message-ID: References: <177562550EF0534C.27380@groups.io> <3505f62e-cc54-490e-983f-7b4312e41509@hpe.com> <3lxerlg6g5gbzsxyh2v4qqqxru34ewytbge2wm6s7quyx3itx6@xlajojgm73qe> <1708ba2b-c969-ee8a-2cbe-fdc9acd31998@redhat.com> <3ea2zwl64ktnxhchys2x3yqndz35gx2ppssvkn5zeg23jt5x7e@qm2jpmw2zveb> <70393bba-23a8-0c26-e245-55cc075e9002@redhat.com> MIME-Version: 1.0 In-Reply-To: <70393bba-23a8-0c26-e245-55cc075e9002@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hQxgnSUQXa9AwYBx38Z2v8F8x7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=XtGU9c8s; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) Hi, > So, yesterday I read your status on virt-staff, and I found an entry in > it that resembled this upstream thread pretty closely. However, your > status was the *only* mention of "mdev" specifically, and so I wasn't > sure if *mdev* meant the same thing as the more generic upstream > expression "pci device assignment" (see it above in the context). > > Furthermore, I saw kvm_arch_has_noncoherent_dma() in my linux commit > 879ae1880449, which superficially resembled device assignment, but... I > dismissed it. In the end, I only managed (and even that, only > reluctantly) the above pointers... Thanks for tracking it down! > > But then, next question: why has this problem *not* been reported > repeatedly? There's a whole bunch of users (gamers) that run Windows > guests with device (GPU) assignment. I'm sure they'd absolutely complain > about very slow OVMF boot (like they actually have, in the past, about > similar LZMA slowdowns due to improper caching setup). static u8 vmx_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio) { [ ... ] * When there is no need to deal with noncoherent DMA (e.g., no VT-d * or VT-d has snoop control), guest CD/MTRR/PAT are all ignored. The * EPT memory type is set to WB. The effective memory type is forced * WB. * * Otherwise, we trust guest. Guest CD/MTRR/PAT are all honored. The * EPT memory type is used to emulate guest CD/MTRR. [ ... ] > Something must be special about Min's assigned device. Yep. I think the magic word is "snoop control". When pci-assigning a *real* pci device VT-d (aka iommu) handles cache control that way. When assigning a mdev device this is not the case. mdev is a virtual pci device emulated by the kernel. This can be purely virtual (see samples/vfio-mdev/mtty.c in the linux kernel, which can be used to reproduce this). More typical is hardware-assisted device partitioning, used for some intel and nvidia gpus. Roughly comparable with SR/IOV, but not implemented completely in hardware, the kernel has some device-specific support code instead. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114292): https://edk2.groups.io/g/devel/message/114292 Mute This Topic: https://groups.io/mt/100367559/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-