From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: x86: Question regarding the reset value of LINT0 Date: Fri, 10 Apr 2015 11:12:17 +0200 Message-ID: <552793F1.7090005@redhat.com> References: <2B474EEE-85C9-47C3-89FF-C56754CFEC0D@gmail.com> <55255AF2.2070706@siemens.com> <06513D06-1629-4AC0-9014-C6D13C29A1FC@gmail.com> <55256004.8030403@siemens.com> <55256A89.3030100@siemens.com> <06DCB70D-52E7-457B-BEEF-051F20136D7A@gmail.com> <5526C4B9.6030101@gmail.com> <8E93BDA9-CCB5-4D7C-9FF0-0CDBCDB78051@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Avi Kivity , Jan Kiszka , kvm list To: Bandan Das , Nadav Amit Return-path: Received: from mail-wi0-f175.google.com ([209.85.212.175]:37396 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753326AbbDJJMV (ORCPT ); Fri, 10 Apr 2015 05:12:21 -0400 Received: by wiaa2 with SMTP id a2so18932155wia.0 for ; Fri, 10 Apr 2015 02:12:20 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/04/2015 21:17, Bandan Das wrote: > > Excluding (1) all of the other issues are related to the VM BIOS. Perhaps > > KVM should somehow realize which VM BIOS runs? (yes, it sounds just as bad.) > > How about renaming the toggle Avi mentioned above to something more generic > (KVM_DISABLE_LEGACY_QUIRKS ?) and grouping all the issues together ? Modern userspace > will always enable it and get the new correct behavior. When more cases are discovered, > KVM can just add them to the list. It can be a VM capability (KVM_FIRMWARE_QUIRKS?) that is enabled via KVM_ENABLE_CAP. The first argument in struct kvm_enable_cap can be used to add more quirks in the future. For now, an argument of zero could be used to: 1) set up LINT0 correctly 2) set up CD and NW correctly in svm_set_cr0 AFAIK the MTRR issue in SeaBIOS was not fixed. For that, QEMU could write to MSR_MTRRcap with KVM_SET_MSR. Setting the "accessed" bit in vmx_set_segment is IMHO harmless, and we might as well do it even if !enable_unrestricted_guest. Paolo