From: Peter Xu <peterx@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com
Subject: Re: [kvm-unit-tests PATCH 0/3] check multiple init for vm/smp
Date: Tue, 25 Oct 2016 19:56:47 +0800 [thread overview]
Message-ID: <20161025115647.GB13839@pxdev.xzpeter.org> (raw)
In-Reply-To: <20161025101247.t2v6td4rwex7ipj3@kamzik.brq.redhat.com>
On Tue, Oct 25, 2016 at 12:12:47PM +0200, Andrew Jones wrote:
> On Tue, Oct 25, 2016 at 05:00:27PM +0800, Peter Xu wrote:
> > The first two patches check whether there are multiple init for
> > vm/smp, assertion fail will be triggered if so.
> >
> > Patch 3 is to cleanup existing setup_igt() when smp_init() is called
> > (suggested by Drew).
> >
> > Peter Xu (3):
> > x86: vm: add assert to avoid multiple vm init
> > x86: smp: assert to avoid multiple init of smp
> > tests: don't call setup_idt() if with smp_init()
> >
> > lib/x86/smp.c | 1 +
> > lib/x86/vm.c | 1 +
> > x86/apic.c | 1 -
> > x86/hyperv_stimer.c | 1 -
> > x86/hyperv_synic.c | 1 -
> > x86/ioapic.c | 1 -
> > x86/tscdeadline_latency.c | 1 -
> > 7 files changed, 2 insertions(+), 5 deletions(-)
> >
> > --
> > 2.7.4
> >
>
> I actually looked at the code this time around and think that only
> patch 1/3 is needed. While it would be pointless to call smp_init
> multiple times, it doesn't hurt (that means 2/3 is OK, but not
> necessary). And, now I see 3/3 is just a cleanup. No assert would
> fire without it. So it's not necessary either.
>
> Actually, wrt to setup_idt, I'd say the only problems with it is
> that there's the 'if (idt_initialized) return' and that it isn't
> named something like setup_idt_defaults. Isn't it conceivable that
> a unit test may want to revert its handlers back to the defaults
> after installing custom handlers by simply calling this again?
Yeah, that's possible. Maybe we can let anyone who needs this first to
introduce the setup_idt_defaults().
For this series: I have no strong willingness to push this in, and yes
all three patches are not essential at all. I just picked them out
from vt-d unit test series, in case any of us would like to pick it.
Thanks,
-- peterx
next prev parent reply other threads:[~2016-10-25 11:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 9:00 [kvm-unit-tests PATCH 0/3] check multiple init for vm/smp Peter Xu
2016-10-25 9:00 ` [kvm-unit-tests PATCH 1/3] x86: vm: add assert to avoid multiple vm init Peter Xu
2016-10-25 12:32 ` Andrew Jones
2016-10-25 9:00 ` [kvm-unit-tests PATCH 2/3] x86: smp: assert to avoid multiple init of smp Peter Xu
2016-10-25 9:00 ` [kvm-unit-tests PATCH 3/3] tests: don't call setup_idt() if with smp_init() Peter Xu
2016-10-25 9:53 ` Andrew Jones
2016-10-25 10:16 ` Andrew Jones
2016-10-25 16:00 ` Paolo Bonzini
2016-10-25 10:12 ` [kvm-unit-tests PATCH 0/3] check multiple init for vm/smp Andrew Jones
2016-10-25 11:56 ` Peter Xu [this message]
2016-10-25 16:00 ` Paolo Bonzini
2016-10-26 2:53 ` Peter Xu
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=20161025115647.GB13839@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox