All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Roman Kagan <rkagan@virtuozzo.com>,
	qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH] i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment
Date: Wed, 23 Oct 2019 08:21:09 -0300	[thread overview]
Message-ID: <20191023112109.GJ4084@habkost.net> (raw)
In-Reply-To: <87k18vzp7t.fsf@vitty.brq.redhat.com>

On Wed, Oct 23, 2019 at 01:16:38PM +0200, Vitaly Kuznetsov wrote:
> Eduardo Habkost <ehabkost@redhat.com> writes:
> 
> > On Mon, Oct 21, 2019 at 06:26:14PM +0200, Paolo Bonzini wrote:
> >> On 21/10/19 16:09, Vitaly Kuznetsov wrote:
> >> >>> +    if (cpu->hyperv_no_nonarch_cs == ON_OFF_AUTO_ON) {
> >> >>> +        env->features[FEAT_HV_RECOMM_EAX] |= HV_NO_NONARCH_CORESHARING;
> >> >>> +    } else if (cpu->hyperv_no_nonarch_cs == ON_OFF_AUTO_AUTO) {
> >> >> Do you want to make auto the default if "-cpu host,migratable=off"?  It
> >> >> can be done on top so I started queueing this patch.
> >> > Hm, one thing is that CPUID 0x40000004 doesn't exist if no Hyper-V
> >> > enlightenments are passed so we'll probably have to modify your idea to
> >> > "-cpu host,migratable=off,+any-hyperv-enlightenment" but then the
> >> > question is how conservative are we, like if QEMU command line doesn't
> >> > change can new CPUID flags appear or not? And we'll probably need a way
> >> > to explicitly disable HV_NO_NONARCH_CORESHARING if needed.
> >> 
> >> I would defer to Eduardo on whether "migratable=off" would allow adding
> >> new CPUID flags.  The follow-up question however is whether we would
> >> benefit from a "+hyperv" option that enables all known Hyper-V
> >> enlightenment for a given machine type.
> >
> > I'm not sure what "adding new CPUID flags" means exactly, but on
> > both cases, the answer is yes:
> >
> > If you mean having new flags appear with the same QEMU command
> > line, this is 100% OK with "-cpu host".  Doubly so with
> > "migratable=off".  "-cpu host" doesn't guarantee a stable guest
> > ABI, and migratable=off doesn't guarantee the ability to live
> > migrate.
> >
> > If you just mean the ability to write "-cpu
> > host,migratable=off,+some-extra-flag", that's OK too.
> >
> > I would try to make "-cpu host,migratable=off" enable all
> > features out of the box (because users probably expect that).
> > But we you have a compelling reason to not enable the hyperv
> > flags by default (do we?), it's OK to require something like
> > "-cpu host,...,+hyperv".
> 
> I'm not sure if the reason is compelling enough but I remember some
> Linux tools were only looking at the first hypervisor signature and
> reporting that we're now running on Hyper-V. Also, more features you
> enable larger the atack surface...
> 
> Actually, we already '-cpu host,hv_passthrough' option which implies
> 'migratable=off', not sure if another one is needed.

So, if I understood correctly, Paolo's "+hyperv" suggestion above
is already implemented by "hv_passthrough"?  Sounds good enough
to me.

-- 
Eduardo



      reply	other threads:[~2019-10-23 11:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 16:39 [PATCH] i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment Vitaly Kuznetsov
2019-10-21 13:08 ` Paolo Bonzini
2019-10-21 14:09   ` Vitaly Kuznetsov
2019-10-21 16:26     ` Paolo Bonzini
2019-10-21 17:15       ` Eduardo Habkost
2019-10-23 11:16         ` Vitaly Kuznetsov
2019-10-23 11:21           ` Eduardo Habkost [this message]

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=20191023112109.GJ4084@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkagan@virtuozzo.com \
    --cc=rth@twiddle.net \
    --cc=vkuznets@redhat.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 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.