From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Jim Mattson <jmattson@google.com>,
Sean Christopherson <seanjc@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kvm/x86: reserve bit KVM_HINTS_PHYS_ADDRESS_SIZE_DATA_VALID
Date: Thu, 22 Sep 2022 13:40:20 +0800 [thread overview]
Message-ID: <7611e818-9e81-1974-1dfa-330a6380c5da@intel.com> (raw)
In-Reply-To: <CALMp9eRkXPPWbPfm16onV9+ondg0x7_RG5ku7hCpBAODLWpSgw@mail.gmail.com>
On 9/22/2022 12:32 AM, Jim Mattson wrote:
> On Wed, Sep 21, 2022 at 8:00 AM Sean Christopherson <seanjc@google.com> wrote:
>>
>> On Wed, Sep 21, 2022, Gerd Hoffmann wrote:
>>> On Fri, Sep 09, 2022 at 07:02:24AM +0200, Gerd Hoffmann wrote:
>>>> On Thu, Sep 08, 2022 at 02:52:36PM +0000, Sean Christopherson wrote:
>>>>> On Thu, Sep 08, 2022, Gerd Hoffmann wrote:
>>>>>> -#define KVM_HINTS_REALTIME 0
>>>>>> +#define KVM_HINTS_REALTIME 0
>>>>>> +#define KVM_HINTS_PHYS_ADDRESS_SIZE_DATA_VALID 1
>>>>>
>>>>> Why does KVM need to get involved? This is purely a userspace problem.
>>>>
>>>> It doesn't. I only need reserve a hints bit, and the canonical source
>>>> for that happens to live in the kernel. That's why this patch doesn't
>>>> touch any actual code ;)
>>
>> The issue is that this "hint" effectively breaks other VMMs that already provide
>> an accurate guest.MAXPHYADDR.
>
> Any VMM that doesn't provide an accurate guest.MAXPHYADDR is broken.
I stand for it as well.
To me, it looks an old QEMU bug and firmware provided a workaround for
the bug that doesn't trust guest's CPUID.0x80000008. IMHO, (guest)
firmware should always trust CPUID and error out if MAXPHYADDR reported
from CPUID is broken to force VMM fixing itself to provide correct CPUID
info. But letting firmware drop the workaround surely breaks backwards
compatibility.
> Why do we need a "hint" that the virtual processor works?
next prev parent reply other threads:[~2022-09-22 5:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 11:41 Gerd Hoffmann
2022-09-08 14:52 ` Sean Christopherson
2022-09-09 5:02 ` Gerd Hoffmann
2022-09-09 9:02 ` Vitaly Kuznetsov
2022-09-09 14:53 ` Sean Christopherson
2022-09-13 9:40 ` Vitaly Kuznetsov
2022-09-21 13:42 ` Gerd Hoffmann
2022-09-21 15:00 ` Sean Christopherson
2022-09-21 16:32 ` Jim Mattson
2022-09-22 5:40 ` Xiaoyao Li [this message]
2022-09-22 12:24 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7611e818-9e81-1974-1dfa-330a6380c5da@intel.com \
--to=xiaoyao.li@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®