From: Sean Christopherson <seanjc@google.com>
To: Chao Gao <chao.gao@intel.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, tglx@linutronix.de, dave.hansen@intel.com,
pbonzini@redhat.com, peterz@infradead.org,
rick.p.edgecombe@intel.com, weijiang.yang@intel.com,
john.allen@amd.com, bp@alien8.de, chang.seok.bae@intel.com,
xin3.li@intel.com, Dave Hansen <dave.hansen@linux.intel.com>,
Eric Biggers <ebiggers@google.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Kees Cook <kees@kernel.org>,
Maxim Levitsky <mlevitsk@redhat.com>,
Mitchell Levy <levymitchell0@gmail.com>,
Nikolay Borisov <nik.borisov@suse.com>,
Oleg Nesterov <oleg@redhat.com>,
Sohil Mehta <sohil.mehta@intel.com>,
Stanislav Spassov <stanspas@amazon.de>,
Vignesh Balasubramanian <vigbalas@amd.com>
Subject: Re: [PATCH v8 0/6] Introduce CET supervisor state support
Date: Fri, 23 May 2025 09:57:33 -0700 [thread overview]
Message-ID: <aDCo_SczQOUaB2rS@google.com> (raw)
In-Reply-To: <20250522151031.426788-1-chao.gao@intel.com>
On Thu, May 22, 2025, Chao Gao wrote:
> Chao Gao (4):
> x86/fpu/xstate: Differentiate default features for host and guest FPUs
> x86/fpu: Initialize guest FPU permissions from guest defaults
> x86/fpu: Initialize guest fpstate and FPU pseudo container from guest
> defaults
> x86/fpu: Remove xfd argument from __fpstate_reset()
>
> Yang Weijiang (2):
> x86/fpu/xstate: Introduce "guest-only" supervisor xfeature set
> x86/fpu/xstate: Add CET supervisor xfeature support as a guest-only
> feature
Acked-by: Sean Christopherson <seanjc@google.com>
Side topic, and *probably* unrelated to this series, I tripped the following
WARN when running it through the KVM tests (though I don't think it has anything
to do with KVM?). The WARN is the version of xfd_validate_state() that's guarded
by CONFIG_X86_DEBUG_FPU=y.
WARNING: CPU: 232 PID: 15391 at arch/x86/kernel/fpu/xstate.c:1543 xfd_validate_state+0x65/0x70
Modules linked in: kvm_intel kvm irqbypass vfat fat dummy bridge stp llc intel_vsec cdc_acm cdc_ncm cdc_eem cdc_ether usbnet mii xhci_pci xhci_hcd ehci_pci ehci_hcd [last unloaded: kvm_intel]
CPU: 232 UID: 0 PID: 15391 Comm: DefaultEventMan Tainted: G S 6.15.0-smp--3542d5d75b5c-cet #678 NONE
Tainted: [S]=CPU_OUT_OF_SPEC
Hardware name: Google Izumi-EMR/izumi, BIOS 0.20240807.2-0 10/09/2024
RIP: 0010:xfd_validate_state+0x65/0x70
Code: 10 4c 3b 60 18 74 23 49 81 fe 80 c4 45 ab 74 15 4d 0b 7e 08 49 f7 d7 49 85 df 75 0e 5b 41 5c 41 5e 41 5f 5d c3 40 84 ed 75 f2 <0f> 0b eb ee 0f 1f 80 00 00 00 00 66 0f 1f 00 0f 1f 44 00 00 48 89
RSP: 0018:ff7ada85584a3e08 EFLAGS: 00010246
RAX: ff2c5d2908a53940 RBX: 00000000000e00ff RCX: ff2c5d2908a53940
RDX: 0000000000000001 RSI: 00000000000e00ff RDI: ff2c5d2908a521c0
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: ffffffffaa56fa4d R11: 0000000000000000 R12: 0000000000040000
R13: ff2c5d2908a521c0 R14: ffffffffab45c480 R15: 0000000000000000
FS: 00007f21084d6700(0000) GS:ff2c5da752b41000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000001ca832006 CR4: 0000000000f73ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400
PKRU: 00000000
Call Trace:
<TASK>
fpu__clear_user_states+0x9c/0x100
arch_do_signal_or_restart+0x142/0x210
exit_to_user_mode_loop+0x55/0x100
do_syscall_64+0x205/0x2c0
entry_SYSCALL_64_after_hwframe+0x4b/0x53
RIP: 0033:0x55ad185f2ee0
Code: 8c fc 48 8d 0d 6e d5 8e fc 4c 8d 05 64 cb 78 fc bf 03 00 00 00 ba 25 03 00 00 49 89 c1 31 c0 e8 e6 2e 08 00 cc cc cc cc cc cc <55> 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 28 49 89 d7 49 89
RSP: 002b:00007f21084d3e38 EFLAGS: 00000246 ORIG_RAX: 00000000000001b9
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000055ad18136f73
RDX: 00007f21084d3e40 RSI: 00007f21084d3f70 RDI: 000000000000001b
RBP: 00007f21084d4f90 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 000011f03fbc2f00 R14: ffffffffffffffff R15: 0000000000000000
</TASK>
irq event stamp: 368
hardirqs last enabled at (367): [<ffffffffaaf5f1b8>] _raw_write_unlock_irq+0x28/0x40
hardirqs last disabled at (368): [<ffffffffaaf5487d>] __schedule+0x1bd/0xea0
softirqs last enabled at (0): [<ffffffffaa2aa1ca>] copy_process+0x38a/0x1350
softirqs last disabled at (0): [<0000000000000000>] 0x0
---[ end trace 0000000000000000 ]---
But I've hit the WARN once before, so whatever is going on is pre-existing. I
haven't done any experiments to see if the WARN fires more frequently with this
series. I mentioned it here purely out of convenience.
------------[ cut here ]------------
WARNING: CPU: 77 PID: 14821 at arch/x86/kernel/fpu/xstate.c:1466 xfd_validate_state+0x4a/0x50
Modules linked in: kvm_intel kvm irqbypass vfat fat dummy bridge stp llc intel_vsec cdc_acm cdc_ncm cdc_eem cdc_ether usbnet mii xhci_pci xhci_hcd ehci_pci ehci_hcd sr_mod cdrom loop [last unloaded: kvm]
CPU: 77 UID: 0 PID: 14821 Comm: futex-default-S Tainted: G S W 6.15.0-smp--a2104d5ba341-sink #605 NONE
Tainted: [S]=CPU_OUT_OF_SPEC, [W]=WARN
Hardware name: Google Izumi-EMR/izumi, BIOS 0.20240807.2-0 10/09/2024
RIP: 0010:xfd_validate_state+0x4a/0x50
Code: 50 0a a9 4d 8b 80 90 17 00 00 49 3b 48 18 74 1a 48 81 ff 80 a4 65 a7 74 0d 48 0b 47 08 48 f7 d0 48 85 f0 75 05 c3 84 d2 75 fb <0f> 0b c3 0f 1f 00 66 0f 1f 00 0f 1f 44 00 00 48 89 f8 48 8b 7f 10
RSP: 0018:ff1ba89ef124fe58 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffa644871e RCX: 0000000000040000
RDX: 0000000000000001 RSI: 00000000000600ff RDI: ffffffffa765a480
RBP: 0000000000000000 R08: ff137abd4db65bc0 R09: 0000000000000000
R10: ffffffffa6775f8d R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ff137abd4db65b80 R15: 0000000000000000
FS: 00007fea8bce7700(0000) GS:ff137afc151b3000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000001a87c0004 CR4: 0000000000f73ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400
PKRU: 00000000
Call Trace:
<TASK>
fpu__clear_user_states+0x92/0xf0
arch_do_signal_or_restart+0x134/0x200
syscall_exit_to_user_mode+0x8a/0x110
do_syscall_64+0x8b/0x160
entry_SYSCALL_64_after_hwframe+0x4b/0x53
RIP: 0033:0x563afb5588c0
Code: f0 e9 df fc ff ff 48 8b 5d 88 4d 89 f0 e9 b5 fe ff ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc <55> 48 89 e5 41 57 41 56 41 55 41 54 53 50 49 89 d7 e8 0a 6f f2 01
RSP: 002b:00007fea8bce4e78 EFLAGS: 00000202 ORIG_RAX: 00000000000000e8
RAX: 0000000000000000 RBX: 000011fcd50a6dd0 RCX: 0000563af84d6b30
RDX: 00007fea8bce4e80 RSI: 00007fea8bce4fb0 RDI: 000000000000001e
RBP: 00007fea8bce5c30 R08: 0000000000000000 R09: 00007fea8bce6ca0
R10: 00000000000007d0 R11: 0000000000000202 R12: 0000000063239328
R13: 00000000680b9c83 R14: 00000000000007d0 R15: 000011fcd5c46150
</TASK>
irq event stamp: 496018
hardirqs last enabled at (496017): [<ffffffffa7158965>] _raw_spin_unlock_irqrestore+0x35/0x50
hardirqs last disabled at (496018): [<ffffffffa714e6fd>] __schedule+0x1bd/0xe90
softirqs last enabled at (495074): [<ffffffffa64c02ec>] __irq_exit_rcu+0x6c/0x130
softirqs last disabled at (495065): [<ffffffffa64c02ec>] __irq_exit_rcu+0x6c/0x130
---[ end trace 0000000000000000 ]---
next prev parent reply other threads:[~2025-05-23 16:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 15:10 [PATCH v8 0/6] Introduce CET supervisor state support Chao Gao
2025-05-22 15:10 ` [PATCH v8 1/6] x86/fpu/xstate: Differentiate default features for host and guest FPUs Chao Gao
2025-05-29 20:59 ` John Allen
2025-05-22 15:10 ` [PATCH v8 2/6] x86/fpu: Initialize guest FPU permissions from guest defaults Chao Gao
2025-05-29 21:14 ` John Allen
2025-05-22 15:10 ` [PATCH v8 3/6] x86/fpu: Initialize guest fpstate and FPU pseudo container " Chao Gao
2025-05-29 21:25 ` John Allen
2025-05-22 15:10 ` [PATCH v8 4/6] x86/fpu: Remove xfd argument from __fpstate_reset() Chao Gao
2025-05-29 21:26 ` John Allen
2025-05-22 15:10 ` [PATCH v8 5/6] x86/fpu/xstate: Introduce "guest-only" supervisor xfeature set Chao Gao
2025-05-30 16:04 ` John Allen
2025-05-22 15:10 ` [PATCH v8 6/6] x86/fpu/xstate: Add CET supervisor xfeature support as a guest-only feature Chao Gao
2025-05-30 16:05 ` John Allen
2025-05-23 16:57 ` Sean Christopherson [this message]
2025-05-23 17:12 ` [PATCH v8 0/6] Introduce CET supervisor state support Dave Hansen
2025-05-23 17:48 ` Sean Christopherson
2025-05-27 11:01 ` Chao Gao
2025-06-02 19:12 ` Chang S. Bae
2025-06-03 6:22 ` Chao Gao
2025-06-03 18:32 ` Chang S. Bae
2025-06-04 0:56 ` Chao Gao
2025-06-04 18:45 ` Dave Hansen
2025-06-16 8:08 ` Chao Gao
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=aDCo_SczQOUaB2rS@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=hpa@zytor.com \
--cc=john.allen@amd.com \
--cc=kees@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=levymitchell0@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=nik.borisov@suse.com \
--cc=oleg@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=sohil.mehta@intel.com \
--cc=stanspas@amazon.de \
--cc=tglx@linutronix.de \
--cc=vigbalas@amd.com \
--cc=weijiang.yang@intel.com \
--cc=x86@kernel.org \
--cc=xin3.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.