Skip to content

Expose x86 XCR0 register#2299

Open
riptl wants to merge 1 commit intounicorn-engine:devfrom
riptl:xcr0-getset
Open

Expose x86 XCR0 register#2299
riptl wants to merge 1 commit intounicorn-engine:devfrom
riptl:xcr0-getset

Conversation

@riptl
Copy link

@riptl riptl commented Feb 23, 2026

Expose the XCR0 register for x86 to allow users to control XSAVE
behavior. This register is a bit odd. It's the only one of its type
(extended control register), and usually accessed via XGETBV/XSETBV.

Note that neither the existing CR or MSR APIs allow accessing XCR0.

I think that modifying XCR0 can potentially change the BND config,
so I added a call to cpu_sync_bndcs_hflags.

@riptl
Copy link
Author

riptl commented Feb 23, 2026

Related: #1955

@riptl
Copy link
Author

riptl commented Feb 23, 2026

Just saw the dev branch, rebasing.

Expose the XCR0 register for x86 to allow users to control XSAVE
behavior. This register is a bit odd. It's the only one of its type
(extended control register), and usually accessed via XGETBV/XSETBV.
@riptl riptl changed the base branch from master to dev February 23, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant