All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yu Zhang <yu.c.zhang@linux.intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	Michal Luczaj <mhal@rbox.co>, David Woodhouse <dwmw@amazon.co.uk>
Subject: Re: [PATCH] KVM: x86: fix deadlock for KVM_XEN_EVTCHN_RESET
Date: Thu, 19 Jan 2023 17:57:45 +0000	[thread overview]
Message-ID: <Y8mEmSESlcdgtVg4@google.com> (raw)
In-Reply-To: <20230119155800.fiypvvzoalnfavse@linux.intel.com>

On Thu, Jan 19, 2023, Yu Zhang wrote:
> Hi Paolo,
> 
> > diff --git a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
> > index 721f6a693799..dae510c263b4 100644
> > --- a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
> > +++ b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
> > @@ -962,6 +962,12 @@ int main(int argc, char *argv[])
> >  	}
> >  
> >   done:
> > +	struct kvm_xen_hvm_attr evt_reset = {
> > +		.type = KVM_XEN_ATTR_TYPE_EVTCHN,
> > +		.u.evtchn.flags = KVM_XEN_EVTCHN_RESET,
> > +	};
> > +	vm_ioctl(vm, KVM_XEN_HVM_SET_ATTR, &evt_reset);
> > +
> >  	alarm(0);
> >  	clock_gettime(CLOCK_REALTIME, &max_ts);
> >  
> 
> This change generates a build failure with error message: 
> "error: a label can only be part of a statement and a declaration is not a statement".

And other flavors too, e.g.

x86_64/xen_shinfo_test.c:965:2: error: expected expression
        struct kvm_xen_hvm_attr evt_reset = {
        ^
x86_64/xen_shinfo_test.c:969:38: error: use of undeclared identifier 'evt_reset'
        vm_ioctl(vm, KVM_XEN_HVM_SET_ATTR, &evt_reset);
                                            ^
x86_64/xen_shinfo_test.c:969:38: error: use of undeclared identifier 'evt_reset'
3 errors generated.
make: *** [../lib.mk:145: tools/testing/selftests/kvm/x86_64/xen_shinfo_test] Error 1
make: *** Waiting for unfinished jobs....

I'm surprised bots haven't complained about this, haven't seen any reports.

> Moving the definition of evt_reset to the beginning of main() can fix it:

I'll queue a patch, this is already in Linus' tree and I've collected a few other
tiny fixes for v6.2-rcwhatever that I'll send to Paolo.

Thanks!

  reply	other threads:[~2023-01-19 17:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 11:04 [PATCH] KVM: x86: fix deadlock for KVM_XEN_EVTCHN_RESET Paolo Bonzini
2023-01-19 15:58 ` Yu Zhang
2023-01-19 17:57   ` Sean Christopherson [this message]
2023-01-19 18:00     ` Paolo Bonzini
2023-01-19 18:04       ` Sean Christopherson
2023-01-19 18:12         ` Paolo Bonzini
2023-01-19 18:14           ` Sean Christopherson
2023-01-19 18:16             ` Paolo Bonzini
2023-02-24 18:18 ` Michal Luczaj
     [not found] <62d7c91f-1486-4aea-8764-352efb383326@email.android.com>
2022-12-28 13:21 ` Paolo Bonzini

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=Y8mEmSESlcdgtVg4@google.com \
    --to=seanjc@google.com \
    --cc=dwmw@amazon.co.uk \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhal@rbox.co \
    --cc=pbonzini@redhat.com \
    --cc=yu.c.zhang@linux.intel.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.