qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: "Alexandre Chartre" <alexandre.chartre@oracle.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Xiaoyao Li" <xiaoyao.li@intel.com>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PULL 1/6] target/i386: do not expose ARCH_CAPABILITIES on AMD CPU
Date: Fri, 18 Jul 2025 10:09:30 +0200	[thread overview]
Message-ID: <993ed8bd-a953-48db-b37e-42178cd0c4b1@redhat.com> (raw)
In-Reply-To: <df3745a5-28ab-482c-9fa1-434d2c0327de@tls.msk.ru>

On 7/18/25 09:21, Michael Tokarev wrote:
> On 17.07.2025 18:23, Paolo Bonzini wrote:
>> KVM emulates the ARCH_CAPABILITIES on x86 for both Intel and AMD
>> cpus, although the IA32_ARCH_CAPABILITIES MSR is an Intel-specific
>> MSR and it makes no sense to emulate it on AMD.
>>
>> As a consequence, VMs created on AMD with qemu -cpu host and using
>> KVM will advertise the ARCH_CAPABILITIES feature and provide the
>> IA32_ARCH_CAPABILITIES MSR. This can cause issues (like Windows BSOD)
>> as the guest OS might not expect this MSR to exist on such cpus (the
>> AMD documentation specifies that ARCH_CAPABILITIES feature and MSR
>> are not defined on the AMD architecture).
>>
>> A fix was proposed in KVM code, however KVM maintainers don't want to
>> change this behavior that exists for 6+ years and suggest changes to be
>> done in QEMU instead.  Therefore, hide the bit from "-cpu host":
>> migration of -cpu host guests is only possible between identical host
>> kernel and QEMU versions, therefore this is not a problematic breakage.
>>
>> If a future AMD machine does include the MSR, that would re-expose the
>> Windows guest bug; but it would not be KVM/QEMU's problem at that
>> point, as we'd be following a genuine physical CPU impl.
>>
>> Reported-by: Alexandre Chartre <alexandre.chartre@oracle.com>
>> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
>> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> This feels like a qemu-stable material, is it not?
Yes, good idea.

Paolo



  reply	other threads:[~2025-07-18  8:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 15:23 [PULL 0/6] Mostly target/i386 patches for QEMU 10.1 hard freeze Paolo Bonzini
2025-07-17 15:23 ` [PULL 1/6] target/i386: do not expose ARCH_CAPABILITIES on AMD CPU Paolo Bonzini
2025-07-18  7:21   ` Michael Tokarev
2025-07-18  8:09     ` Paolo Bonzini [this message]
2025-07-17 15:23 ` [PULL 2/6] i386/cpu: Move x86_ext_save_areas[] initialization to .instance_init Paolo Bonzini
2025-07-17 15:23 ` [PULL 3/6] meson: re-generate scripts/meson-buildoptions.sh to fix IGVM entry Paolo Bonzini
2025-07-17 15:23 ` [PULL 4/6] target/i386: tdx: fix locking for interrupt injection Paolo Bonzini
2025-07-17 15:23 ` [PULL 5/6] i386/cpu: Cleanup host_cpu_max_instance_init() Paolo Bonzini
2025-07-17 15:23 ` [PULL 6/6] i386/tdx: Remove the redundant qemu_mutex_init(&tdx->lock) Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2025-07-17 16:06 [PULL 0/6] Mostly target/i386 patches for QEMU 10.1 hard freeze Paolo Bonzini
2025-07-17 16:06 ` [PULL 1/6] target/i386: do not expose ARCH_CAPABILITIES on AMD CPU 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=993ed8bd-a953-48db-b37e-42178cd0c4b1@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alexandre.chartre@oracle.com \
    --cc=berrange@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=xiaoyao.li@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).