[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine |
Date: |
Tue, 6 Jul 2021 10:37:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/6/21 10:24 AM, Thomas Huth wrote:
> On 16/04/2021 14.52, Thomas Huth wrote:
>> QEMU currently crashes when the user tries to do something like:
>>
>> qemu-system-x86_64 -M x-remote -device piix3-ide
>
> It's now several months later already, and this crash has still not been
> fixed yet. The next softfreeze is around the corner and the
> "device-crash-test" still stumbles accross this problem.
> If the other solutions are not mergable yet (what's the status here?),
See this big thread about ISA vs PCI IDE modelling / design:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg809678.html
TL;DR: short term we are screwed. long term, not worth it.
Stefan, IIRC the multi-process conclusion was we have to reject
PCI devices briding another (non-PCI) bus, such ISA / I2C / USB
/ SD / ... because QEMU register the bus type globally and the
command line machinery resolves it to plug user-creatable devices,
so we can not share such buses. Is that correct?
> could we please include my patch for QEMU v6.1 instead, so that we get
> this silenced in the device-crash-test script?
Yes please.
Regards,
Phil.
>> This happens because the "isabus" variable is not initialized with
>> the x-remote machine yet. Add a proper check for this condition
>> and propagate the error to the caller, so we can fail there gracefully.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> hw/ide/ioport.c | 16 ++++++++++------
>> hw/ide/piix.c | 22 +++++++++++++++++-----
>> hw/isa/isa-bus.c | 14 ++++++++++----
>> include/hw/ide/internal.h | 2 +-
>> include/hw/isa/isa.h | 13 ++++++++-----
>> 5 files changed, 46 insertions(+), 21 deletions(-)