[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e9b2aab2-4a6f-4739-a939-c448414e6af2@www.fastmail.com>
Date: Tue, 08 Jun 2021 21:32:26 -0700
From: "Andy Lutomirski" <luto@...nel.org>
To: "Andi Kleen" <ak@...ux.intel.com>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"Sathyanarayanan Kuppuswamy"
<sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>,
"Dave Hansen" <dave.hansen@...el.com>,
"Tony Luck" <tony.luck@...el.com>,
"Kirill Shutemov" <kirill.shutemov@...ux.intel.com>,
"Kuppuswamy Sathyanarayanan" <knsathya@...nel.org>,
"Raj Ashok" <ashok.raj@...el.com>,
"Sean Christopherson" <seanjc@...gle.com>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC v2-fix-v4 1/1] x86/tdx: Skip WBINVD instruction for TDX guest
On Tue, Jun 8, 2021, at 9:25 PM, Andi Kleen wrote:
>
> > I like this description, but shouldn't the logic be:
> >
> > if (!CPUID has hypervisor bit set)
> > wbinvd();
> >
> > As far as I know, most hypervisors will turn WBINVD into a noop and,
> > even if they don't, it seems to be that something must be really quite
> > wrong for a guest to need to WBINVD for ACPI purposes.
>
> KVM only turns it into a noop if there is no VT-d, because with VT-d you
> might need it to turn mappings into uncached and vice versa.
Wow, I found the kvm_arch_register_noncoherent_dma() stuff. That's horrifying. What's it for? Are there actually guests that use devices exposed by VFIO that expect WBINVD to work? That's a giant DoS hole.
>
> But yes the change would make sense for reboot. BTW I suspect for the
> reboot path it isn't really needed anywhere modern, so it might actually
> be ok to completely disable it. But that's some risk, so doing it only
> for hypervisor is reasonable.
I agree.
Powered by blists - more mailing lists