[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT |
Date: |
Mon, 8 Feb 2016 15:20:47 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 02/08/2016 08:14 AM, Roman Kagan wrote:
> On Fri, Feb 05, 2016 at 07:25:07PM +0100, Igor Mammedov wrote:
>> On Thu, 4 Feb 2016 23:54:13 +0200
>> "Michael S. Tsirkin" <address@hidden> wrote:
>>> -static Aml *build_fdc_device_aml(void)
>>> +static Aml *build_fdinfo_aml(int idx, uint8_t type, uint8_t cylinders,
>>> + uint8_t heads, uint8_t sectors)
>>> +{
>>> + Aml *dev, *fdi;
>>> +
>>> + dev = aml_device("FLP%c", 'A' + idx);
>>> +
>>> + aml_append(dev, aml_name_decl("_ADR", aml_int(idx)));
>>> +
>>> + fdi = aml_package(0x10);
>>> + aml_append(fdi, aml_int(idx)); /* Drive Number */
>>> + aml_append(fdi,
>>> + aml_int(cmos_get_fd_drive_type(type))); /* Device Type */
>>> + aml_append(fdi,
>>> + aml_int(cylinders - 1)); /* Maximum Cylinder Number */
>> this puts uint64_t(-1) in AML i.e. cylinders == 0 and overflow happens here
>>
>> CCing Jon
>
> I guess this is the effect of John's fdc rework. I used to think zero
> geometry was impossible at the time this patch was developed.
>
> I wonder if it hasn't been fixed already by
>
> commit fd9bdbd3459e5b9d51534f0747049bc5b6145e07
> Author: John Snow <address@hidden>
> Date: Wed Feb 3 11:28:55 2016 -0500
>
> fdc: fix detection under Linux
>
> Accidentally, I removed a "feature" where empty drives had geometry
> values applied to them, which allows seek on empty drives to work
> "by accident," as QEMU actually tries to disallow that.
>
> Seeks on empty drives should work, though, but the easiest thing is to
> restore the misfeature where empty drives have non-zero geometries
> applied.
>
> Document the hack accordingly.
>
> [Maintainer edit]
>
> This fix corrects a regression introduced in d5d47efc, where
> pick_geometry was modified such that it would not operate on empty
> drives, and as a result if there is no diskette inserted, QEMU
> no longer populates it with geometry bounds. As a result, seek fails
> when QEMU denies to move the current track, but reports success anyway.
> This can confuse the guest, leading to kernel panics in the guest.
>
>
> Signed-off-by: John Snow <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Message-id: address@hidden
>
> Roman.
>
Yes, hopefully solved on my end. The geometry values for an empty disk
are not well defined (they certainly don't have any *meaning*) so if you
are populating tables based on an empty drive, I just hope you also have
the mechanisms needed to update said tables when the media changes.
What do the guests use these values for? Are they fixed at boot?
--js
- [Qemu-devel] [PULL 41/49] pc: set the OEM fields in the RSDT and the FADT from the SLIC, (continued)
- [Qemu-devel] [PULL 41/49] pc: set the OEM fields in the RSDT and the FADT from the SLIC, Michael S. Tsirkin, 2016/02/04
- [Qemu-devel] [PULL 42/49] dimm: Correct type of MemoryHotplugState->base, Michael S. Tsirkin, 2016/02/04
- [Qemu-devel] [PULL 43/49] intel_iommu: large page support, Michael S. Tsirkin, 2016/02/04
- [Qemu-devel] [PULL 44/49] fix MSI injection on Xen, Michael S. Tsirkin, 2016/02/04
- [Qemu-devel] [PULL 45/49] net: set endianness on all backend devices, Michael S. Tsirkin, 2016/02/04
- [Qemu-devel] [PULL 46/49] i386/acpi: make floppy controller object dynamic, Michael S. Tsirkin, 2016/02/04
- [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Michael S. Tsirkin, 2016/02/04
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Igor Mammedov, 2016/02/05
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/08
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT,
John Snow <=
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/09
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, John Snow, 2016/02/09
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Laszlo Ersek, 2016/02/09
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Michael S. Tsirkin, 2016/02/09
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, John Snow, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Michael S. Tsirkin, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, John Snow, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/10