Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-23 Thread Paolo Bonzini
- Original Message - > From: "Alastair D'Silva" > To: "Paolo Bonzini" , "Cédric Le Goater" > , qemu-...@nongnu.org > Cc: qemu-devel@nongnu.org, "Peter Maydell" , > "Andrew Jeffery" , "Joel > Stanley" > Sent: Wednesday, November 23, 2016 12:19:50 AM > Subject: Re: [PATCH 2/4] qtest: Su

Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-22 Thread Alastair D'Silva
On Tue, 2016-11-22 at 23:39 +0100, Paolo Bonzini wrote: > On 22/11/2016 23:31, Alastair D'Silva wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > +if (irq == NULL) { > > > > > > > > +qtest_send_prefix(chr); > > > > > > > > +

Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-22 Thread Paolo Bonzini
On 22/11/2016 23:31, Alastair D'Silva wrote: > > > +if (irq == NULL) { > > > +qtest_send_prefix(chr); > > > +qtest_send(chr, "FAIL Unknown IRQ\n"); > > > +return; > > > +} > > > + > > > +qemu_set_irq(ir

Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-22 Thread Alastair D'Silva
On Tue, 2016-11-22 at 18:24 +0100, Paolo Bonzini wrote: > > On 22/11/2016 18:22, Cédric Le Goater wrote: > > > > > > > > + > > > +g_assert(words[1]); /* device */ > > > +g_assert(words[2]); /* gpio list */ > > > +g_assert(words[3]); /* gpio line in list */ > > > +   

Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-22 Thread Cédric Le Goater
On 11/17/2016 05:36 AM, Alastair D'Silva wrote: > From: Alastair D'Silva > > The QTest framework cannot work with named interrupts. This patch > adds support for them, as well as the ability to manipulate them > from within a test. > > Read actions are via callbacks, which allows for pulsed inte

Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-22 Thread Paolo Bonzini
On 22/11/2016 18:22, Cédric Le Goater wrote: >> + >> +g_assert(words[1]); /* device */ >> +g_assert(words[2]); /* gpio list */ >> +g_assert(words[3]); /* gpio line in list */ >> +g_assert(words[4]); /* level */ >> +dev = DEVICE(object_resolve_path(words[1],

[Qemu-devel] [PATCH 2/4] qtest: Support named interrupts

2016-11-17 Thread Alastair D'Silva
From: Alastair D'Silva The QTest framework cannot work with named interrupts. This patch adds support for them, as well as the ability to manipulate them from within a test. Read actions are via callbacks, which allows for pulsed interrupts to be read (the polled method used for the unnamed inte