* Re: [PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants
[not found] ` <20230531211043.41724-7-shentey@gmail.com>
@ 2023-05-31 21:25 ` Philippe Mathieu-Daudé
2023-06-01 12:24 ` Mark Cave-Ayland
1 sibling, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-05-31 21:25 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: Jiaxun Yang, qemu-ppc, qemu-block, John Snow, Huacai Chen,
BALATON Zoltan
On 31/5/23 23:10, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/ide/pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 3/7] hw/isa/vt82c686: Remove via_isa_set_irq()
[not found] ` <20230531211043.41724-4-shentey@gmail.com>
@ 2023-05-31 21:27 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-05-31 21:27 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: Jiaxun Yang, qemu-ppc, qemu-block, John Snow, Huacai Chen,
BALATON Zoltan, Mark Cave-Ayland
On 31/5/23 23:10, Bernhard Beschow wrote:
> Now that via_isa_set_irq() is unused it can be removed.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> include/hw/isa/vt82c686.h | 2 --
> hw/isa/vt82c686.c | 6 ------
> 2 files changed, 8 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants
[not found] ` <20230531211043.41724-7-shentey@gmail.com>
2023-05-31 21:25 ` [PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants Philippe Mathieu-Daudé
@ 2023-06-01 12:24 ` Mark Cave-Ayland
1 sibling, 0 replies; 6+ messages in thread
From: Mark Cave-Ayland @ 2023-06-01 12:24 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: Jiaxun Yang, Philippe Mathieu-Daudé, qemu-ppc, qemu-block,
John Snow, Huacai Chen, BALATON Zoltan
On 31/05/2023 22:10, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/ide/pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ide/pci.c b/hw/ide/pci.c
> index 0b26a4ce9f..a25b352537 100644
> --- a/hw/ide/pci.c
> +++ b/hw/ide/pci.c
> @@ -320,7 +320,8 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val)
>
> void bmdma_status_writeb(BMDMAState *bm, uint32_t val)
> {
> - bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 0x06);
> + bm->status = (val & 0x60) | (bm->status & BM_STATUS_DMAING)
> + | (bm->status & ~val & (BM_STATUS_ERROR | BM_STATUS_INT));
> }
>
> static uint64_t bmdma_addr_read(void *opaque, hwaddr addr,
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 7/7] hw/ide/piix: Move registration of VMStateDescription to DeviceClass
[not found] ` <20230531211043.41724-8-shentey@gmail.com>
@ 2023-06-01 12:26 ` Mark Cave-Ayland
0 siblings, 0 replies; 6+ messages in thread
From: Mark Cave-Ayland @ 2023-06-01 12:26 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: Jiaxun Yang, Philippe Mathieu-Daudé, qemu-ppc, qemu-block,
John Snow, Huacai Chen, BALATON Zoltan
On 31/05/2023 22:10, Bernhard Beschow wrote:
> The modern, declarative way to set up VM state handling is to assign to
> DeviceClass::vmsd attribute.
>
> There shouldn't be any change in behavior since dc->vmsd causes
> vmstate_register_with_alias_id() to be called on the instance during
> the instance init phase. vmstate_register() was also called during the
> instance init phase which forwards to vmstate_register_with_alias_id()
> internally. Checking the migration schema before and after this patch confirms:
>
> before:
>> qemu-system-x86_64 -S
>> qemu > migrate -d exec:cat>before.mig
>
> after:
>> qemu-system-x86_64 -S
>> qemu > migrate -d exec:cat>after.mig
>
>> analyze-migration.py -d desc -f before.mig > before.json
>> analyze-migration.py -d desc -f after.mig > after.json
>> diff before.json after.json
> -> empty
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/ide/piix.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 47e0b474c3..151f206046 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -28,7 +28,6 @@
> */
>
> #include "qemu/osdep.h"
> -#include "migration/vmstate.h"
> #include "qapi/error.h"
> #include "hw/pci/pci.h"
> #include "hw/ide/piix.h"
> @@ -159,8 +158,6 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp)
> bmdma_setup_bar(d);
> pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar);
>
> - vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
> -
> for (unsigned i = 0; i < 2; i++) {
> if (!pci_piix_init_bus(d, i, errp)) {
> return;
> @@ -186,6 +183,7 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
> PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
>
> dc->reset = piix_ide_reset;
> + dc->vmsd = &vmstate_ide_pci;
> k->realize = pci_piix_ide_realize;
> k->exit = pci_piix_ide_exitfn;
> k->vendor_id = PCI_VENDOR_ID_INTEL;
> @@ -208,6 +206,7 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
> PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
>
> dc->reset = piix_ide_reset;
> + dc->vmsd = &vmstate_ide_pci;
> k->realize = pci_piix_ide_realize;
> k->exit = pci_piix_ide_exitfn;
> k->vendor_id = PCI_VENDOR_ID_INTEL;
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/7] VIA and general PCI IDE cleanup
[not found] <20230531211043.41724-1-shentey@gmail.com>
` (2 preceding siblings ...)
[not found] ` <20230531211043.41724-8-shentey@gmail.com>
@ 2023-07-10 21:27 ` Bernhard Beschow
2023-07-10 22:12 ` Philippe Mathieu-Daudé
4 siblings, 0 replies; 6+ messages in thread
From: Bernhard Beschow @ 2023-07-10 21:27 UTC (permalink / raw)
To: qemu-devel
Cc: Jiaxun Yang, Philippe Mathieu-Daudé, qemu-ppc, qemu-block,
John Snow, Huacai Chen, BALATON Zoltan
Am 31. Mai 2023 21:10:36 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>This series is split off from a more general PCI IDE refactoring aiming for a
>
>common implementation of the PCI IDE controller specification for all
>
>TYPE_PCI_IDE models [1].
>
>
>
>The first three patches resolve a circular dependency between the VIA IDE
>
>controller and its south bridge. The next three patches resolves redundant code
>
>accross all TYPE_PCI_IDE models. The last patch modernizes VM state setup in
>
>PIIX IDE.
>
>
>
>Testing done:
>
>* `make check`
>
>* `make check-avocado`
>
>* `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device \
>
> ati-vga,guest_hwcursor=true,romfile="" -cdrom morphos-3.17.iso \
>
> -bios pegasos2.rom`
>
> The machine booted successfully and a startup sound was hearable
>
>* `qemu-system-ppc -machine sam460ex -rtc base=localtime -drive \
>
> if=none,id=cd,file=morphos-3.17.iso,format=raw -device \
>
> ide-cd,drive=cd,bus=ide.1`
>
> The machine booted successfully into graphical desktop environment
>
>
>
>v3:
>
>* Fix formatting (Mark) ... and split into two commits (Bernhard)
>
>
>
>v2:
>
>* Add missing Signed-off-by tag to last commit (Zoltan)
>
>
>
>Changes since [1]:
>
>* Turn legacy IRQs into named GPIOs (Mark)
>
>* Don't make VIA IDE legacy IRQs routable; just wire up in host device (Zoltan)
>
>* Rename extracted bmdma_clear_status() (Zoltan)
>
> ... to bmdma_status_writeb() (Mark)
>
>
>
>[1] https://lore.kernel.org/qemu-devel/20230422150728.176512-1-shentey@gmail.com/
>
>
>
>Bernhard Beschow (7):
>
> hw/ide/pci: Expose legacy interrupts as named GPIOs
>
> hw/ide/via: Wire up IDE legacy interrupts in host device
>
> hw/isa/vt82c686: Remove via_isa_set_irq()
>
> hw/ide: Extract IDEBus assignment into bmdma_init()
>
> hw/ide: Extract bmdma_status_writeb()
>
> hw/ide/pci: Replace some magic numbers by constants
>
> hw/ide/piix: Move registration of VMStateDescription to DeviceClass
>
Ping
AFAICS all patches are reviewed.
Best regards,
Bernhard
>
>
> include/hw/ide/pci.h | 1 +
>
> include/hw/isa/vt82c686.h | 2 --
>
> hw/ide/cmd646.c | 3 +--
>
> hw/ide/pci.c | 16 ++++++++++++++++
>
> hw/ide/piix.c | 8 +++-----
>
> hw/ide/sii3112.c | 7 ++-----
>
> hw/ide/via.c | 9 +++++----
>
> hw/isa/vt82c686.c | 11 +++++------
>
> 8 files changed, 33 insertions(+), 24 deletions(-)
>
>
>
>-- >
>2.40.1
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/7] VIA and general PCI IDE cleanup
[not found] <20230531211043.41724-1-shentey@gmail.com>
` (3 preceding siblings ...)
2023-07-10 21:27 ` [PATCH v3 0/7] VIA and general PCI IDE cleanup Bernhard Beschow
@ 2023-07-10 22:12 ` Philippe Mathieu-Daudé
4 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-10 22:12 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: Jiaxun Yang, qemu-ppc, qemu-block, John Snow, Huacai Chen,
BALATON Zoltan
On 31/5/23 23:10, Bernhard Beschow wrote:
> This series is split off from a more general PCI IDE refactoring aiming for a
> common implementation of the PCI IDE controller specification for all
> TYPE_PCI_IDE models [1].
> Bernhard Beschow (7):
> hw/ide/pci: Expose legacy interrupts as named GPIOs
> hw/ide/via: Wire up IDE legacy interrupts in host device
> hw/isa/vt82c686: Remove via_isa_set_irq()
> hw/ide: Extract IDEBus assignment into bmdma_init()
> hw/ide: Extract bmdma_status_writeb()
> hw/ide/pci: Replace some magic numbers by constants
> hw/ide/piix: Move registration of VMStateDescription to DeviceClass
Queued to mips-next, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-10 22:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230531211043.41724-1-shentey@gmail.com>
[not found] ` <20230531211043.41724-7-shentey@gmail.com>
2023-05-31 21:25 ` [PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants Philippe Mathieu-Daudé
2023-06-01 12:24 ` Mark Cave-Ayland
[not found] ` <20230531211043.41724-4-shentey@gmail.com>
2023-05-31 21:27 ` [PATCH v3 3/7] hw/isa/vt82c686: Remove via_isa_set_irq() Philippe Mathieu-Daudé
[not found] ` <20230531211043.41724-8-shentey@gmail.com>
2023-06-01 12:26 ` [PATCH v3 7/7] hw/ide/piix: Move registration of VMStateDescription to DeviceClass Mark Cave-Ayland
2023-07-10 21:27 ` [PATCH v3 0/7] VIA and general PCI IDE cleanup Bernhard Beschow
2023-07-10 22:12 ` Philippe Mathieu-Daudé
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).