Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-23 Thread Richard Henderson
On 6/23/24 14:27, Alexander Monakov wrote: Hello, On Wed, 12 Jun 2024, Paolo Bonzini wrote: I didn't do this because of RHEL9, I did it because it's silly that QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to compute the x86 parity flag (and POPCNT was introduced at the same

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-23 Thread Alexander Monakov
Hello, On Wed, 12 Jun 2024, Paolo Bonzini wrote: > I didn't do this because of RHEL9, I did it because it's silly that > QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to > compute the x86 parity flag (and POPCNT was introduced at the same > time as SSE4.2). I do not see where the

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 7:00 PM Daniel P. Berrangé wrote: > > I guess that, because these helpers are called by TCG, you wouldn't > > pay the price of the indirect call. However, adding all this > > infrastructure for 13-15 year old CPUs is not very enthralling. > > Rather than re-introducing a

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 04:09:29PM +0100, Daniel P. Berrangé wrote: > On Wed, Jun 12, 2024 at 01:21:26PM +0100, Daniel P. Berrangé wrote: > > On Wed, Jun 12, 2024 at 01:51:31PM +0200, Paolo Bonzini wrote: > > > On Wed, Jun 12, 2024 at 1:38 PM Daniel P. Berrangé > > > wrote: > > > > This isn't

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 01:51:31PM +0200, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 1:38 PM Daniel P. Berrangé > wrote: > > If we want to use POPCNT in the TCG code, can we not do a runtime check > > and selectively build pieces of code with > > __attribute__((target("popcnt"))), > > as

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 06:40:09PM +0300, Alexander Monakov wrote: > > On Wed, 12 Jun 2024, Daniel P. Berrangé wrote: > > > I learnt that FESCo approved a surprisingly loose rule saying > > > > "Libraries packaged in Fedora may require ISA extensions, > >however any packaged application

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Daniel P. Berrangé wrote: > I learnt that FESCo approved a surprisingly loose rule saying > > "Libraries packaged in Fedora may require ISA extensions, >however any packaged application must not crash on any >officially supported architecture, either by providing

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 5:09 PM Daniel P. Berrangé wrote: > This might suggest we could put a runtime feature check in main(), > print a warning and then exit(1), however, QEMU has alot of code > that is triggered from ELF constructors. If we're building the > entire of QEMU codebase with extra

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 01:21:26PM +0100, Daniel P. Berrangé wrote: > On Wed, Jun 12, 2024 at 01:51:31PM +0200, Paolo Bonzini wrote: > > On Wed, Jun 12, 2024 at 1:38 PM Daniel P. Berrangé > > wrote: > > > This isn't anything to do with the distro installer. The use case is that > > > the distro

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 3:34 PM Alexander Monakov wrote: > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > > I found out from the mailing list. My Core2-based desktop would be > > > > affected. > > > > > > Do you run QEMU on it? With KVM or TCG? >

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 3:34 PM Alexander Monakov wrote: > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > I found out from the mailing list. My Core2-based desktop would be > > > affected. > > > > Do you run QEMU on it? With KVM or TCG? > > Excuse me? Are you going to ask for SSH access to

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > I found out from the mailing list. My Core2-based desktop would be affected. > > Do you run QEMU on it? With KVM or TCG? Excuse me? Are you going to ask for SSH access to ensure my computer really exists and is in working order? Can you tell me

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 01:51:31PM +0200, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 1:38 PM Daniel P. Berrangé > wrote: > > This isn't anything to do with the distro installer. The use case is that > > the distro wants all its software to be able to run on the x86_64 baseline > > it has

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 2:11 PM Alexander Monakov wrote: > > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > Ahah, nice. :) I'm pretty sure that, when I tested "pf = > > (__builtin_popcount(x) & 1) * 4;", it was generating a call to > > __builtin_popcountsi2. > > Why write

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > Ahah, nice. :) I'm pretty sure that, when I tested "pf = > (__builtin_popcount(x) & 1) * 4;", it was generating a call to > __builtin_popcountsi2. Why write '__builtin_popcount(x) & 1' when you can write '__builtin_parity(x)' in the first place? >

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 1:46 PM Alexander Monakov wrote: > > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > On Wed, Jun 12, 2024 at 1:19 PM Alexander Monakov > > wrote: > > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > > I didn't do this because of RHEL9, I did it because it's silly that

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 1:38 PM Daniel P. Berrangé wrote: > This isn't anything to do with the distro installer. The use case is that > the distro wants all its software to be able to run on the x86_64 baseline > it has chosen to build with. Sure, and they can patch the packages if their wish is

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 1:19 PM Alexander Monakov wrote: > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > I didn't do this because of RHEL9, I did it because it's silly that > > > QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to > >

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 01:12:43PM +0200, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 1:04 PM Daniel P. Berrangé > wrote: > > > > On Wed, Jun 12, 2024 at 01:55:20PM +0300, Alexander Monakov wrote: > > > Hello, > > > > > > I'm sending straightforward reverts to recent patches that bumped

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 1:19 PM Alexander Monakov wrote: > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > I didn't do this because of RHEL9, I did it because it's silly that > > QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to > > compute the x86 parity flag (and POPCNT was

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > I didn't do this because of RHEL9, I did it because it's silly that > QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to > compute the x86 parity flag (and POPCNT was introduced at the same > time as SSE4.2). >From looking at that POPCNT

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Daniel P. Berrangé wrote: > On Wed, Jun 12, 2024 at 01:55:20PM +0300, Alexander Monakov wrote: > > Hello, > > > > I'm sending straightforward reverts to recent patches that bumped minimum > > required x86 instruction set to SSE4.2. The older chips did not stop > > working,

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Paolo Bonzini
On Wed, Jun 12, 2024 at 1:04 PM Daniel P. Berrangé wrote: > > On Wed, Jun 12, 2024 at 01:55:20PM +0300, Alexander Monakov wrote: > > Hello, > > > > I'm sending straightforward reverts to recent patches that bumped minimum > > required x86 instruction set to SSE4.2. The older chips did not stop >

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 01:55:20PM +0300, Alexander Monakov wrote: > Hello, > > I'm sending straightforward reverts to recent patches that bumped minimum > required x86 instruction set to SSE4.2. The older chips did not stop working, > and people still test and use new software on older hardware:

[PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
Hello, I'm sending straightforward reverts to recent patches that bumped minimum required x86 instruction set to SSE4.2. The older chips did not stop working, and people still test and use new software on older hardware: https://sourceware.org/bugzilla/show_bug.cgi?id=31867 Considering the very