All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Moger, Babu" <Babu.Moger@amd.com>
Cc: "geoff@hostfission.com" <geoff@hostfission.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"mst@redhat.com" <mst@redhat.com>,
	"kash@tripleback.net" <kash@tripleback.net>,
	"mtosatti@redhat.com" <mtosatti@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	Jiri Denemark <jdenemar@redhat.com>,
	"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC CPU
Date: Tue, 12 Jun 2018 16:05:54 -0300	[thread overview]
Message-ID: <20180612190554.GO7451@localhost.localdomain> (raw)
In-Reply-To: <DM5PR12MB2471F6EA1525A824A9A94545957F0@DM5PR12MB2471.namprd12.prod.outlook.com>

On Tue, Jun 12, 2018 at 06:38:08PM +0000, Moger, Babu wrote:
[...]
> > I'm starting to think that enabling TOPOEXT automatically is
> > adding too much complexity and compatibility problems, and it's
> > better to leave this task to management software.
> > 
> > The main problem here is:
> > 
> > This works today with QEMU 2.12 + Linux <= 4.15:
> >   $ $QEMU -machine pc -cpu EPYC,enforce -smp
> > 8,sockets=2,cores=2,threads=2"
> > and must keep working with QEMU 3.0 and Linux <= 4.15.
> > 
> > In addition to that, the results for:
> >   $ $QEMU -machine pc-q35-3.0 -cpu EPYC,enforce [...]
> > must be deterministic and expose exactly the same CPUID data even
> > if host hardware or software changes, as long as the QEMU
> > command-line is the same.
> > 
> > Do you see a way to fulfill those two constraints while making
> > "-machine pc-q35-3.0 -cpu EPYC" enable TOPOEXT automatically?
> > 
> 
> Now(setting feature before x86_cpu_expand_features), enabling
> TOPOEXT appears to work fine.

What about the above constraints?  Are you really fulfilling
them?

This one is tricky:

] This works today with QEMU 2.12 + Linux <= 4.15:
]   $ $QEMU -machine pc -cpu EPYC,enforce -smp 8,sockets=2,cores=2,threads=2"
] and must keep working with QEMU 3.0 and Linux <= 4.15.

If we enable TOPOEXT unconditionally, the command-line won't work
with Linux <= 4.15.

If we enable TOPOEXT only if the kernel returns TOPOEXT on
GET_SUPPORTED_CPUID, we break the second constraint:

] The results for:
]   $ $QEMU -machine pc-q35-3.0 -cpu EPYC,enforce [...]
] must be deterministic and expose exactly the same CPUID data even
] if host hardware or software changes, as long as the QEMU
] command-line is the same.

-- 
Eduardo

WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Moger, Babu" <Babu.Moger@amd.com>
Cc: "mst@redhat.com" <mst@redhat.com>,
	"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"rth@twiddle.net" <rth@twiddle.net>,
	"mtosatti@redhat.com" <mtosatti@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"kash@tripleback.net" <kash@tripleback.net>,
	"geoff@hostfission.com" <geoff@hostfission.com>,
	Jiri Denemark <jdenemar@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC CPU
Date: Tue, 12 Jun 2018 16:05:54 -0300	[thread overview]
Message-ID: <20180612190554.GO7451@localhost.localdomain> (raw)
In-Reply-To: <DM5PR12MB2471F6EA1525A824A9A94545957F0@DM5PR12MB2471.namprd12.prod.outlook.com>

On Tue, Jun 12, 2018 at 06:38:08PM +0000, Moger, Babu wrote:
[...]
> > I'm starting to think that enabling TOPOEXT automatically is
> > adding too much complexity and compatibility problems, and it's
> > better to leave this task to management software.
> > 
> > The main problem here is:
> > 
> > This works today with QEMU 2.12 + Linux <= 4.15:
> >   $ $QEMU -machine pc -cpu EPYC,enforce -smp
> > 8,sockets=2,cores=2,threads=2"
> > and must keep working with QEMU 3.0 and Linux <= 4.15.
> > 
> > In addition to that, the results for:
> >   $ $QEMU -machine pc-q35-3.0 -cpu EPYC,enforce [...]
> > must be deterministic and expose exactly the same CPUID data even
> > if host hardware or software changes, as long as the QEMU
> > command-line is the same.
> > 
> > Do you see a way to fulfill those two constraints while making
> > "-machine pc-q35-3.0 -cpu EPYC" enable TOPOEXT automatically?
> > 
> 
> Now(setting feature before x86_cpu_expand_features), enabling
> TOPOEXT appears to work fine.

What about the above constraints?  Are you really fulfilling
them?

This one is tricky:

] This works today with QEMU 2.12 + Linux <= 4.15:
]   $ $QEMU -machine pc -cpu EPYC,enforce -smp 8,sockets=2,cores=2,threads=2"
] and must keep working with QEMU 3.0 and Linux <= 4.15.

If we enable TOPOEXT unconditionally, the command-line won't work
with Linux <= 4.15.

If we enable TOPOEXT only if the kernel returns TOPOEXT on
GET_SUPPORTED_CPUID, we break the second constraint:

] The results for:
]   $ $QEMU -machine pc-q35-3.0 -cpu EPYC,enforce [...]
] must be deterministic and expose exactly the same CPUID data even
] if host hardware or software changes, as long as the QEMU
] command-line is the same.

-- 
Eduardo

  reply	other threads:[~2018-06-12 19:05 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 22:56 [PATCH v13 0/5] i386: Enable TOPOEXT to support hyperthreading on AMD CPU Babu Moger
2018-06-08 22:56 ` [Qemu-devel] " Babu Moger
2018-06-08 22:56 ` [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD Babu Moger
2018-06-08 22:56   ` [Qemu-devel] " Babu Moger
2018-06-11 20:54   ` Eduardo Habkost
2018-06-11 20:54     ` [Qemu-devel] " Eduardo Habkost
2018-06-11 21:02     ` Moger, Babu
2018-06-11 21:02       ` [Qemu-devel] " Moger, Babu
2020-06-02 17:52   ` Eduardo Habkost
2020-06-02 17:52     ` Eduardo Habkost
2020-06-03 23:57     ` Babu Moger
2020-06-03 23:57       ` Babu Moger
2020-06-04 14:06     ` Babu Moger
2020-06-04 14:06       ` Babu Moger
2020-06-04 20:54       ` Eduardo Habkost
2020-06-04 20:54         ` Eduardo Habkost
2020-06-05 16:21         ` Babu Moger
2020-06-05 16:21           ` Babu Moger
2018-06-08 22:56 ` [PATCH v13 2/5] i386: Introduce auto_topoext bit to manage topoext Babu Moger
2018-06-08 22:56   ` [Qemu-devel] " Babu Moger
2018-06-11 20:25   ` Moger, Babu
2018-06-11 20:25     ` [Qemu-devel] " Moger, Babu
2018-06-11 20:46     ` Eduardo Habkost
2018-06-11 20:46       ` [Qemu-devel] " Eduardo Habkost
2018-06-11 20:59       ` Moger, Babu
2018-06-11 20:59         ` [Qemu-devel] " Moger, Babu
2018-06-11 21:05       ` Eduardo Habkost
2018-06-11 21:05         ` [Qemu-devel] " Eduardo Habkost
2018-06-11 21:20         ` Moger, Babu
2018-06-11 21:20           ` [Qemu-devel] " Moger, Babu
2018-06-08 22:56 ` [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC CPU Babu Moger
2018-06-08 22:56   ` [Qemu-devel] " Babu Moger
2018-06-11 20:50   ` Eduardo Habkost
2018-06-11 20:50     ` [Qemu-devel] " Eduardo Habkost
2018-06-11 21:01     ` Moger, Babu
2018-06-11 21:01       ` [Qemu-devel] " Moger, Babu
2018-06-11 21:10     ` Eduardo Habkost
2018-06-11 21:10       ` [Qemu-devel] " Eduardo Habkost
2018-06-12 16:29       ` Moger, Babu
2018-06-12 16:29         ` [Qemu-devel] " Moger, Babu
2018-06-12 17:40         ` Eduardo Habkost
2018-06-12 17:40           ` [Qemu-devel] " Eduardo Habkost
2018-06-12 18:38           ` Moger, Babu
2018-06-12 18:38             ` [Qemu-devel] " Moger, Babu
2018-06-12 19:05             ` Eduardo Habkost [this message]
2018-06-12 19:05               ` Eduardo Habkost
2018-06-12 19:46               ` Babu Moger
2018-06-12 19:46                 ` [Qemu-devel] " Babu Moger
2018-06-13 16:52                 ` Moger, Babu
2018-06-13 16:52                   ` [Qemu-devel] " Moger, Babu
2018-06-13 17:18                   ` Eduardo Habkost
2018-06-13 17:18                     ` [Qemu-devel] " Eduardo Habkost
2018-06-13 18:10                     ` Moger, Babu
2018-06-13 18:10                       ` [Qemu-devel] " Moger, Babu
2018-06-13 18:12                       ` Moger, Babu
2018-06-13 18:12                         ` [Qemu-devel] " Moger, Babu
2018-06-13 18:17                       ` Eduardo Habkost
2018-06-13 18:17                         ` [Qemu-devel] " Eduardo Habkost
2018-06-13 18:21                         ` Moger, Babu
2018-06-13 18:21                           ` [Qemu-devel] " Moger, Babu
2018-06-13 18:49                           ` Eduardo Habkost
2018-06-13 18:49                             ` [Qemu-devel] " Eduardo Habkost
2018-06-14  0:58                             ` Moger, Babu
2018-06-14  0:58                               ` [Qemu-devel] " Moger, Babu
2018-06-08 22:56 ` [PATCH v13 4/5] i386: Verify and enable topoext feature if supported Babu Moger
2018-06-08 22:56   ` [Qemu-devel] " Babu Moger
2018-06-11 20:51   ` Eduardo Habkost
2018-06-11 20:51     ` [Qemu-devel] " Eduardo Habkost
2018-06-11 21:01     ` Moger, Babu
2018-06-11 21:01       ` [Qemu-devel] " Moger, Babu
2018-06-08 22:56 ` [PATCH v13 5/5] i386: Remove generic SMT thread check Babu Moger
2018-06-08 22:56   ` [Qemu-devel] " Babu Moger

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=20180612190554.GO7451@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=Babu.Moger@amd.com \
    --cc=geoff@hostfission.com \
    --cc=jdenemar@redhat.com \
    --cc=kash@tripleback.net \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.