public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Dösinger" <stefan@codeweavers.com>
To: 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, "H. Peter Anvin" <hpa@zytor.com>
Cc: Elizabeth Figura <zfigura@codeweavers.com>
Subject: Re: x86 SGDT emulation for Wine
Date: Wed, 03 Jan 2024 10:30:24 +0300	[thread overview]
Message-ID: <13430819.uLZWGnKmhe@grey> (raw)
In-Reply-To: <3207569.5fSG56mABF@uriel>

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

Am Dienstag, 2. Januar 2024, 22:53:26 EAT schrieb Elizabeth Figura:
>   I'm concerned that this will be very expensive. Most VM users don't need
> to exit on every syscall. While I haven't tested KVM, I think some other
> Wine developers actually did a similar experiment using a hypervisor to
> solve some other problem (related to 32-bit support on Mac OS), and exiting
> the hypervisor was prohibitively slow.

Just to add to this point, Ken Thomases and I experimented with this on Mac 
OS, and as Zeb said, we found it to be unworkably slow. In the d3d games we 
tested the performance of hypervisor + lots of exits was approximately the 
same as running all 32 bit guest code inside qemu's software CPU emulation, or 
about 5% of the performance of using native 32 bit mac processes (when they 
still existed). From what we could tell the cost was imposed by the CPU and 
not MacOS' very lightweight hypervisor API.

There are obviously differences between Mac and Linux, and with Wine's new 
syscalls we probably don't need to exit as often as my hangover wrapper DLLs 
did, but combined with the other reasons Zeb listed I don't think running Wine 
inside KVM is ever going to be realistic.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-01-03  7:30 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 [this message]
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
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=13430819.uLZWGnKmhe@grey \
    --to=stefan@codeweavers.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