qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9
@ 2015-06-01 14:09 Marcel Apfelbaum
  2015-06-01 14:13 ` Marcel Apfelbaum
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Apfelbaum @ 2015-06-01 14:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcel, pbonzini, jsnow, kraxel, mst

In DSDT FDC0 declares the IO region as IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04).
Use the same in lpc_ich9 initialization code.
Now the floppy drive is detected correctly on Windows.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
---
 hw/isa/lpc_ich9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index dba7585..bc9afc6 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n, void *opaque)
         /* lpt */
         pci_conf[0x82] |= 0x04;
     }
-    if (memory_region_present(io_as, 0x3f0)) {
+    if (memory_region_present(io_as, 0x3f2)) {
         /* floppy */
         pci_conf[0x82] |= 0x08;
     }
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9
  2015-06-01 14:09 [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9 Marcel Apfelbaum
@ 2015-06-01 14:13 ` Marcel Apfelbaum
  2015-06-01 14:45   ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Apfelbaum @ 2015-06-01 14:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, jsnow, kraxel, mst

On 06/01/2015 05:09 PM, Marcel Apfelbaum wrote:
> In DSDT FDC0 declares the IO region as IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04).
> Use the same in lpc_ich9 initialization code.
> Now the floppy drive is detected correctly on Windows.
>
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
> ---
>   hw/isa/lpc_ich9.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index dba7585..bc9afc6 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n, void *opaque)
>           /* lpt */
>           pci_conf[0x82] |= 0x04;
>       }
> -    if (memory_region_present(io_as, 0x3f0)) {
> +    if (memory_region_present(io_as, 0x3f2)) {
>           /* floppy */
>           pci_conf[0x82] |= 0x08;
>       }
>

Hi,

I cc-ed the developers involved in the mail thread:
     https://lists.gnu.org/archive/html/qemu-block/2015-05/msg01043.html
and the FDC maintainer. I hope I didn't miss anybody.

I also have no knowledge of FDC, but I think the above patch is correct
and solves the problem of floppy disk missing in Windows for Q35 machines.

Comments appreciated as always.

Thanks,
Marcel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9
  2015-06-01 14:13 ` Marcel Apfelbaum
@ 2015-06-01 14:45   ` Paolo Bonzini
  2015-06-01 14:54     ` Marcel Apfelbaum
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2015-06-01 14:45 UTC (permalink / raw)
  To: Marcel Apfelbaum, qemu-devel; +Cc: jsnow, kraxel, mst



On 01/06/2015 16:13, Marcel Apfelbaum wrote:
> 
>> In DSDT FDC0 declares the IO region as IO(Decode16, 0x03F2, 0x03F2,
>> 0x00, 0x04).
>> Use the same in lpc_ich9 initialization code.
>> Now the floppy drive is detected correctly on Windows.
>>
>> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
>> ---
>>   hw/isa/lpc_ich9.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
>> index dba7585..bc9afc6 100644
>> --- a/hw/isa/lpc_ich9.c
>> +++ b/hw/isa/lpc_ich9.c
>> @@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n,
>> void *opaque)
>>           /* lpt */
>>           pci_conf[0x82] |= 0x04;
>>       }
>> -    if (memory_region_present(io_as, 0x3f0)) {
>> +    if (memory_region_present(io_as, 0x3f2)) {
>>           /* floppy */
>>           pci_conf[0x82] |= 0x08;
>>       }
>>
> 
> Hi,
> 
> I cc-ed the developers involved in the mail thread:
>     https://lists.gnu.org/archive/html/qemu-block/2015-05/msg01043.html
> and the FDC maintainer. I hope I didn't miss anybody.
> 
> I also have no knowledge of FDC, but I think the above patch is correct
> and solves the problem of floppy disk missing in Windows for Q35 machines.

The patch is okay, but the correct definition of the area is from 0x3F1
to 0x3F7.

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9
  2015-06-01 14:45   ` Paolo Bonzini
@ 2015-06-01 14:54     ` Marcel Apfelbaum
  2015-06-01 14:57       ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Apfelbaum @ 2015-06-01 14:54 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: jsnow, kraxel, mst

On 06/01/2015 05:45 PM, Paolo Bonzini wrote:
>
>
> On 01/06/2015 16:13, Marcel Apfelbaum wrote:
>>
>>> In DSDT FDC0 declares the IO region as IO(Decode16, 0x03F2, 0x03F2,
>>> 0x00, 0x04).
>>> Use the same in lpc_ich9 initialization code.
>>> Now the floppy drive is detected correctly on Windows.
>>>
>>> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
>>> ---
>>>    hw/isa/lpc_ich9.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
>>> index dba7585..bc9afc6 100644
>>> --- a/hw/isa/lpc_ich9.c
>>> +++ b/hw/isa/lpc_ich9.c
>>> @@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n,
>>> void *opaque)
>>>            /* lpt */
>>>            pci_conf[0x82] |= 0x04;
>>>        }
>>> -    if (memory_region_present(io_as, 0x3f0)) {
>>> +    if (memory_region_present(io_as, 0x3f2)) {
>>>            /* floppy */
>>>            pci_conf[0x82] |= 0x08;
>>>        }
>>>
>>
>> Hi,
>>
>> I cc-ed the developers involved in the mail thread:
>>      https://lists.gnu.org/archive/html/qemu-block/2015-05/msg01043.html
>> and the FDC maintainer. I hope I didn't miss anybody.
>>
>> I also have no knowledge of FDC, but I think the above patch is correct
>> and solves the problem of floppy disk missing in Windows for Q35 machines.
>
> The patch is okay, but the correct definition of the area is from 0x3F1
> to 0x3F7.
Can we do other fixes on top of this? This patch solves the actual Windows problem
and now we can use floppies for Q35.

Can I take this okay as a "Reviewed-by"? )
Thanks,
Marcel


>
> Paolo
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9
  2015-06-01 14:54     ` Marcel Apfelbaum
@ 2015-06-01 14:57       ` Paolo Bonzini
  2015-06-01 15:06         ` Marcel Apfelbaum
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2015-06-01 14:57 UTC (permalink / raw)
  To: Marcel Apfelbaum; +Cc: mst, jsnow, qemu-devel, kraxel

> On 06/01/2015 05:45 PM, Paolo Bonzini wrote:
> > The patch is okay, but the correct definition of the area is from 0x3F1
> > to 0x3F7.
> Can we do other fixes on top of this? This patch solves the actual Windows
> problem and now we can use floppies for Q35.

Well, IANAM. :)

> Can I take this okay as a "Reviewed-by"? )

Sure.

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9
  2015-06-01 14:57       ` Paolo Bonzini
@ 2015-06-01 15:06         ` Marcel Apfelbaum
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Apfelbaum @ 2015-06-01 15:06 UTC (permalink / raw)
  To: Paolo Bonzini, mst; +Cc: jsnow, qemu-devel, kraxel

On 06/01/2015 05:57 PM, Paolo Bonzini wrote:
>> On 06/01/2015 05:45 PM, Paolo Bonzini wrote:
>>> The patch is okay, but the correct definition of the area is from 0x3F1
>>> to 0x3F7.
>> Can we do other fixes on top of this? This patch solves the actual Windows
>> problem and now we can use floppies for Q35.
>
> Well, IANAM. :)
>
>> Can I take this okay as a "Reviewed-by"? )
>
> Sure.
Thanks Paolo!

Michael, maybe you can take this patch under pci/Q35 branch?
Thanks,
Marcel

>
> Paolo
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-01 15:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01 14:09 [Qemu-devel] [PATCH] hw/q35: fix floppy controller definition in ich9 Marcel Apfelbaum
2015-06-01 14:13 ` Marcel Apfelbaum
2015-06-01 14:45   ` Paolo Bonzini
2015-06-01 14:54     ` Marcel Apfelbaum
2015-06-01 14:57       ` Paolo Bonzini
2015-06-01 15:06         ` Marcel Apfelbaum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).