Messages in this thread | | | Date | Thu, 6 Aug 2020 08:19:30 -0400 | From | "Michael S. Tsirkin" <> | Subject | Re: [PATCH 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory |
| |
On Thu, Aug 06, 2020 at 01:39:09PM +0200, Vitaly Kuznetsov wrote: > "Michael S. Tsirkin" <mst@redhat.com> writes: > > > About the feature bit, I am not sure why it's really needed. A single > > mmio access is cheaper than two io accesses anyway, right? So it makes > > sense for a kvm guest whether host has this feature or not. > > We need to be careful and limit to a specific QEMU implementation > > to avoid tripping up bugs, but it seems more appropriate to > > check it using pci host IDs. > > Right, it's just that "running on KVM" is too coarse grained, we just > need a way to somehow distinguish between "known/good" and > "unknown/buggy" configurations.
Basically it's not KVM, it's QEMU that is known good. QEMU vendor id in the pci host seems like a reasonable way to detect that. If someone reuses QEMU ID - I guess they better behave just like QEMU :)
I also proposed only limiting this to register 0 (device id), will make it very unlikely this can break accidentally ...
> -- > Vitaly
| |