From: Sean Christopherson <seanjc@google.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Elizabeth Figura <zfigura@codeweavers.com>,
x86@kernel.org, Linux Kernel <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
wine-devel@winehq.org
Subject: Re: x86 SGDT emulation for Wine
Date: Thu, 4 Jan 2024 17:21:19 -0800 [thread overview]
Message-ID: <ZZdZj7p1OcrAzDcQ@google.com> (raw)
In-Reply-To: <B042BACA-839E-4A42-9BAA-AC7E58624250@zytor.com>
On Thu, Jan 04, 2024, H. Peter Anvin wrote:
> On January 3, 2024 10:35:28 PM PST, Elizabeth Figura <zfigura@codeweavers.com> wrote:
> >That still leaves the question of performance though. If having to exit the VM
> >that often for performance reasons isn't feasible, then that's still going to
> >force us to implement from scratch an inordinate amount of kernel/library code
> >inside the VM just to avoid the transition. Or, more likely, conclude that a
> >hypervisor just isn't going to work for us.
> >
> >I'm not at all familiar with the arch code, and I'm sure I'm not asking
> >anything interesting, but is it really impossible to put CPU_ENTRY_AREA_RO_IDT
> >somewhere that doesn't truncate to NULL, and to put the GDT at a fixed address
> >as well?
>
> Putting the GDT at a fixed address is pretty much a no-go for a variety of
> reasons. As I said, a prctl() to specify the desired return information *on
> UMIP-capable hardware* is certainly doable. However, it does not address
> things like fixed selectors that have come up.
>
> Note that there is no fundamental reason you cannot run the Unix user space
> code inside the VM container, too; you only need to vmexit on an actual
> system call. KVM might be able to assist there by providing a "short-circuit
> mode", allowing a system call vmexit to invoke the system call directly
> rather than having to bounce back to user space – twice.
Heh, I recommend not re-opening that can of worms[1], though some of the follow-up
work[2] from the gVisor folks might be useful/relevant?
[1] https://lore.kernel.org/all/20220722230241.1944655-1-avagin@google.com
[2] https://lore.kernel.org/all/20230308073201.3102738-1-avagin@google.com
next prev parent reply other threads:[~2024-01-05 1:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-27 22:20 x86 SGDT emulation for Wine Elizabeth Figura
2023-12-27 23:58 ` H. Peter Anvin
2024-01-02 17:12 ` Sean Christopherson
2024-01-02 19:53 ` Elizabeth Figura
2024-01-03 7:30 ` Stefan Dösinger
2024-01-03 15:19 ` Sean Christopherson
2024-01-03 15:33 ` H. Peter Anvin
2024-01-04 6:35 ` Elizabeth Figura
2024-01-05 1:02 ` H. Peter Anvin
2024-01-05 1:21 ` Sean Christopherson [this message]
2024-01-05 2:47 ` Andrew Cooper
2024-01-05 4:03 ` H. Peter Anvin
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=ZZdZj7p1OcrAzDcQ@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=wine-devel@winehq.org \
--cc=x86@kernel.org \
--cc=zfigura@codeweavers.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