Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-10 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 07/01/20 13:08, Vitaly Kuznetsov wrote: >> Honestly I forgot the story why we filtered out these features upon >> eVMCS enablement in KVM. As there are no corresponding eVMCS fields, >> there's no way a guest can actually use them. > > Well, mostly because we mimicked w

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-08 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES >> >> the problem with it is that we don't have 'apic_access_addr' field in >> eVMCS ('virtual_apic_page_addr' is there). By running the same setup >> with eVMCS disabled I figured out which address can be hardcoded to make >> it boo

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-07 Thread Paolo Bonzini
SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES > > the problem with it is that we don't have 'apic_access_addr' field in > eVMCS ('virtual_apic_page_addr' is there). By running the same setup > with eVMCS disabled I figured out which address can be hardcoded to make > it boot. > Maybe it's really hard co

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-07 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 07/01/20 13:08, Vitaly Kuznetsov wrote: >> Honestly I forgot the story why we filtered out these features upon >> eVMCS enablement in KVM. As there are no corresponding eVMCS fields, >> there's no way a guest can actually use them. > > Well, mostly because we mimicked w

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-07 Thread Paolo Bonzini
On 07/01/20 13:08, Vitaly Kuznetsov wrote: > Honestly I forgot the story why we filtered out these features upon > eVMCS enablement in KVM. As there are no corresponding eVMCS fields, > there's no way a guest can actually use them. Well, mostly because we mimicked what Hyper-V was doing I guess.

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-07 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 02/01/20 21:39, Vitaly Kuznetsov wrote: >> When enlightened VMCS is enabled, certain VMX controls disappear, e.g. >> posted interrupts for PINBASED_CTLS. With fine-grained VMX feature >> enablement QEMU tries to do KVM_SET_MSRS with default (matching CPU >> model) value

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-07 Thread Paolo Bonzini
On 02/01/20 21:39, Vitaly Kuznetsov wrote: > When enlightened VMCS is enabled, certain VMX controls disappear, e.g. > posted interrupts for PINBASED_CTLS. With fine-grained VMX feature > enablement QEMU tries to do KVM_SET_MSRS with default (matching CPU > model) values and fails as KVM doesn't all

[PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-02 Thread Vitaly Kuznetsov
When enlightened VMCS is enabled, certain VMX controls disappear, e.g. posted interrupts for PINBASED_CTLS. With fine-grained VMX feature enablement QEMU tries to do KVM_SET_MSRS with default (matching CPU model) values and fails as KVM doesn't allow to set now-unsupported controls. The ideal solu