Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Alex Williamson
On Tue, 2010-10-26 at 16:26 +0200, Gleb Natapov wrote: > On Tue, Oct 26, 2010 at 08:15:52AM -0600, Alex Williamson wrote: > > On Tue, 2010-10-26 at 13:20 +0200, Markus Armbruster wrote: > > > >> How to tell whether it's primary or secondary? Primary uses I/O ports > > > >> 0x1f0..0x1ff,0x3f0..0x3f

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Tue, Oct 26, 2010 at 08:15:52AM -0600, Alex Williamson wrote: > On Tue, 2010-10-26 at 13:20 +0200, Markus Armbruster wrote: > > >> How to tell whether it's primary or secondary? Primary uses I/O ports > > >> 0x1f0..0x1ff,0x3f0..0x3ff and IRQ 14. IRQ could be easier to check, > > >> because it

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Alex Williamson
On Tue, 2010-10-26 at 13:20 +0200, Markus Armbruster wrote: > >> How to tell whether it's primary or secondary? Primary uses I/O ports > >> 0x1f0..0x1ff,0x3f0..0x3ff and IRQ 14. IRQ could be easier to check, > >> because it should be right in ISADevice member isairq[0]. > >> Alternatively, upcast

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Tue, Oct 26, 2010 at 02:39:28PM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > [...] > > You take things out of context in individual mails and in a context of > > patch series. Are you doing it for the sake of arguing? > > I'm trying to help. If you don't need or want my help, I

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Markus Armbruster
Gleb Natapov writes: [...] > You take things out of context in individual mails and in a context of > patch series. Are you doing it for the sake of arguing? I'm trying to help. If you don't need or want my help, I'll find something more productive to do. I'm prescribing myself a little cool-o

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Tue, Oct 26, 2010 at 01:59:45PM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > On Tue, Oct 26, 2010 at 11:29:49AM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > On Mon, Oct 25, 2010 at 08:06:13PM +0200, Markus Armbruster wrote: > >> >> Gleb Natapov write

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Tue, Oct 26, 2010 at 01:20:47PM +0200, Markus Armbruster wrote: > [Note cc: Alex] > > Gleb Natapov writes: > > > On Tue, Oct 26, 2010 at 11:14:20AM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: > >> >

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Markus Armbruster
Gleb Natapov writes: > On Tue, Oct 26, 2010 at 11:29:49AM +0200, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > On Mon, Oct 25, 2010 at 08:06:13PM +0200, Markus Armbruster wrote: >> >> Gleb Natapov writes: >> >> >> >> > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wro

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Markus Armbruster
[Note cc: Alex] Gleb Natapov writes: > On Tue, Oct 26, 2010 at 11:14:20AM +0200, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: >> >> Gleb Natapov writes: >> >> >> >> > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Mark

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Tue, Oct 26, 2010 at 11:14:20AM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: > >> >> Gleb Natapov write

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Tue, Oct 26, 2010 at 11:29:49AM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > On Mon, Oct 25, 2010 at 08:06:13PM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: > >> >> Gleb Natapov write

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Markus Armbruster
Gleb Natapov writes: > On Mon, Oct 25, 2010 at 08:06:13PM +0200, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: >> >> Gleb Natapov writes: >> >> >> >> > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wro

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Markus Armbruster
Gleb Natapov writes: > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: >> >> Gleb Natapov writes: >> >> >> >> > Without this patch both buses on PIIX3_IDE device have the same

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-26 Thread Gleb Natapov
On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > Without this patch both buses on PIIX3_IDE device have the same unit id. > >> > >> Are you su

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-25 Thread Markus Armbruster
Gleb Natapov writes: > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: >> >> Gleb Natapov writes: >> >> >> >> > Without this patch both buses on PIIX3_IDE device have the same

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-25 Thread Gleb Natapov
On Mon, Oct 25, 2010 at 08:06:13PM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: > >> >> Gleb Natapov write

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-25 Thread Gleb Natapov
On Mon, Oct 25, 2010 at 06:22:12PM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: > >> Gleb Natapov writes: > >> > >> > Without this patch both buses on PIIX3_IDE device have the same unit id. > >> > >> Are you su

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-25 Thread Markus Armbruster
Gleb Natapov writes: > On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > Without this patch both buses on PIIX3_IDE device have the same unit id. >> >> Are you sure that's wrong? >> > So how do I know which bus is it on PIIX3_IDE? [...] Let me

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-25 Thread Gleb Natapov
On Mon, Oct 25, 2010 at 04:29:35PM +0200, Markus Armbruster wrote: > Gleb Natapov writes: > > > Without this patch both buses on PIIX3_IDE device have the same unit id. > > Are you sure that's wrong? > So how do I know which bus is it on PIIX3_IDE? > As far as I can see, IDEBus member unit is

Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-25 Thread Markus Armbruster
Gleb Natapov writes: > Without this patch both buses on PIIX3_IDE device have the same unit id. Are you sure that's wrong? As far as I can see, IDEBus member unit is the currently active unit, set by write to port 6 (in ide_ioport_write()) and cleared on reset (in ide_bus_reset()). > Signed-of

[Qemu-devel] [PATCH] initialize unit id of IDE bus

2010-10-24 Thread Gleb Natapov
Without this patch both buses on PIIX3_IDE device have the same unit id. Signed-off-by: Gleb Natapov diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index ff80dd5..b2cbdbc 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -257,8 +257,8 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) p