* [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class
2022-05-13 18:09 [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
@ 2022-05-13 18:09 ` Bernhard Beschow
2022-05-19 14:29 ` Anthony PERARD via
2022-05-13 18:09 ` [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug() Bernhard Beschow
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Bernhard Beschow @ 2022-05-13 18:09 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel,
Bernhard Beschow, Paolo Bonzini, Richard Henderson,
Eduardo Habkost, Michael S. Tsirkin, Marcel Apfelbaum, John Snow,
open list:IDE
Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci
generic class init function' already resolved redundant code which in
turn rendered piix3-ide-xen redundant.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/i386/pc_piix.c | 3 +--
hw/ide/piix.c | 7 -------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index f843dd906f..c2bf33d2f1 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -244,8 +244,7 @@ static void pc_init1(MachineState *machine,
if (pcmc->pci_enabled) {
PCIDevice *dev;
- dev = pci_create_simple(pci_bus, piix3_devfn + 1,
- xen_enabled() ? "piix3-ide-xen" : "piix3-ide");
+ dev = pci_create_simple(pci_bus, piix3_devfn + 1, "piix3-ide");
pci_ide_create_devs(dev);
idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index ce89fd0aa3..2345fe9e1d 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -241,12 +241,6 @@ static const TypeInfo piix3_ide_info = {
.class_init = piix3_ide_class_init,
};
-static const TypeInfo piix3_ide_xen_info = {
- .name = "piix3-ide-xen",
- .parent = TYPE_PCI_IDE,
- .class_init = piix3_ide_class_init,
-};
-
/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */
static void piix4_ide_class_init(ObjectClass *klass, void *data)
{
@@ -272,7 +266,6 @@ static const TypeInfo piix4_ide_info = {
static void piix_ide_register_types(void)
{
type_register_static(&piix3_ide_info);
- type_register_static(&piix3_ide_xen_info);
type_register_static(&piix4_ide_info);
}
--
2.36.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class
2022-05-13 18:09 ` [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class Bernhard Beschow
@ 2022-05-19 14:29 ` Anthony PERARD via
0 siblings, 0 replies; 14+ messages in thread
From: Anthony PERARD @ 2022-05-19 14:29 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-trivial, sstabellini, paul, xen-devel,
Paolo Bonzini, Richard Henderson, Eduardo Habkost,
Michael S. Tsirkin, Marcel Apfelbaum, John Snow, open list:IDE
On Fri, May 13, 2022 at 08:09:55PM +0200, Bernhard Beschow wrote:
> Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci
> generic class init function' already resolved redundant code which in
> turn rendered piix3-ide-xen redundant.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Creating a guest and migrating a guest seems to work fine without
"piix3-ide-xen", and I can't find this name used outside of QEMU. So I
guess it's fine to remove it.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class
@ 2022-05-19 14:29 ` Anthony PERARD via
0 siblings, 0 replies; 14+ messages in thread
From: Anthony PERARD via @ 2022-05-19 14:29 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-trivial, sstabellini, paul, xen-devel,
Paolo Bonzini, Richard Henderson, Eduardo Habkost,
Michael S. Tsirkin, Marcel Apfelbaum, John Snow, open list:IDE
On Fri, May 13, 2022 at 08:09:55PM +0200, Bernhard Beschow wrote:
> Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci
> generic class init function' already resolved redundant code which in
> turn rendered piix3-ide-xen redundant.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Creating a guest and migrating a guest seems to work fine without
"piix3-ide-xen", and I can't find this name used outside of QEMU. So I
guess it's fine to remove it.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()
2022-05-13 18:09 [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
2022-05-13 18:09 ` [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class Bernhard Beschow
@ 2022-05-13 18:09 ` Bernhard Beschow
2022-05-19 14:33 ` Anthony PERARD via
2022-05-13 18:09 ` [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug() Bernhard Beschow
2022-05-28 21:23 ` [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
3 siblings, 1 reply; 14+ messages in thread
From: Bernhard Beschow @ 2022-05-13 18:09 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel,
Bernhard Beschow, John Snow, open list:IDE
The comment is based on commit message
ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk
unplug option'. Since it seems to describe design decisions and
limitations that still apply it seems worth having.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ide/piix.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 2345fe9e1d..bc1b37512a 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -173,6 +173,17 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp)
}
}
+/*
+ * The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
+ * request unplug of 'aux' disks (which is stated to mean all IDE disks,
+ * except the primary master).
+ *
+ * NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
+ * is simultaneously requested is not clear. The implementation assumes
+ * that an 'all' request overrides an 'aux' request.
+ *
+ * [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.pandoc
+ */
int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux)
{
PCIIDEState *pci_ide;
--
2.36.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()
2022-05-13 18:09 ` [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug() Bernhard Beschow
@ 2022-05-19 14:33 ` Anthony PERARD via
0 siblings, 0 replies; 14+ messages in thread
From: Anthony PERARD @ 2022-05-19 14:33 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-trivial, sstabellini, paul, xen-devel,
John Snow, open list:IDE
On Fri, May 13, 2022 at 08:09:56PM +0200, Bernhard Beschow wrote:
> The comment is based on commit message
> ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk
> unplug option'. Since it seems to describe design decisions and
> limitations that still apply it seems worth having.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 2345fe9e1d..bc1b37512a 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -173,6 +173,17 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp)
> }
> }
>
> +/*
> + * The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
> + * request unplug of 'aux' disks (which is stated to mean all IDE disks,
> + * except the primary master).
> + *
> + * NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
> + * is simultaneously requested is not clear. The implementation assumes
> + * that an 'all' request overrides an 'aux' request.
> + *
> + * [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.pandoc
> + */
> int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux)
> {
> PCIIDEState *pci_ide;
That comments seems to focus on 'aux', but it also gives some pointer on
what calls the function. So it looks fine.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()
@ 2022-05-19 14:33 ` Anthony PERARD via
0 siblings, 0 replies; 14+ messages in thread
From: Anthony PERARD via @ 2022-05-19 14:33 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-trivial, sstabellini, paul, xen-devel,
John Snow, open list:IDE
On Fri, May 13, 2022 at 08:09:56PM +0200, Bernhard Beschow wrote:
> The comment is based on commit message
> ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk
> unplug option'. Since it seems to describe design decisions and
> limitations that still apply it seems worth having.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 2345fe9e1d..bc1b37512a 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -173,6 +173,17 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp)
> }
> }
>
> +/*
> + * The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
> + * request unplug of 'aux' disks (which is stated to mean all IDE disks,
> + * except the primary master).
> + *
> + * NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
> + * is simultaneously requested is not clear. The implementation assumes
> + * that an 'all' request overrides an 'aux' request.
> + *
> + * [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.pandoc
> + */
> int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux)
> {
> PCIIDEState *pci_ide;
That comments seems to focus on 'aux', but it also gives some pointer on
what calls the function. So it looks fine.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
2022-05-13 18:09 [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
2022-05-13 18:09 ` [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class Bernhard Beschow
2022-05-13 18:09 ` [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug() Bernhard Beschow
@ 2022-05-13 18:09 ` Bernhard Beschow
2022-05-19 14:37 ` Anthony PERARD via
2022-05-30 13:21 ` Philippe Mathieu-Daudé via
2022-05-28 21:23 ` [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
3 siblings, 2 replies; 14+ messages in thread
From: Bernhard Beschow @ 2022-05-13 18:09 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel,
Bernhard Beschow, Michael S. Tsirkin, Marcel Apfelbaum,
Paolo Bonzini, Richard Henderson, Eduardo Habkost, John Snow,
open list:IDE
This function was declared in a generic and public header, implemented
in a device-specific source file but only used in xen_platform. Given its
'aux' parameter, this function is more xen-specific than piix-specific.
Also, the hardcoded magic constants seem to be generic and related to
PCIIDEState and IDEBus rather than piix.
Therefore, move this function to xen_platform, unexport it, and drop the
"piix3" in the function name as well.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Paul Durrant <paul@xen.org>
---
hw/i386/xen/xen_platform.c | 48 +++++++++++++++++++++++++++++++++++++-
hw/ide/piix.c | 46 ------------------------------------
include/hw/ide.h | 3 ---
3 files changed, 47 insertions(+), 50 deletions(-)
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 72028449ba..a64265cca0 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/ide.h"
+#include "hw/ide/pci.h"
#include "hw/pci/pci.h"
#include "hw/xen/xen_common.h"
#include "migration/vmstate.h"
@@ -134,6 +135,51 @@ static void pci_unplug_nics(PCIBus *bus)
pci_for_each_device(bus, 0, unplug_nic, NULL);
}
+/*
+ * The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
+ * request unplug of 'aux' disks (which is stated to mean all IDE disks,
+ * except the primary master).
+ *
+ * NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
+ * is simultaneously requested is not clear. The implementation assumes
+ * that an 'all' request overrides an 'aux' request.
+ *
+ * [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.pandoc
+ */
+static void pci_xen_ide_unplug(DeviceState *dev, bool aux)
+{
+ PCIIDEState *pci_ide;
+ int i;
+ IDEDevice *idedev;
+ IDEBus *idebus;
+ BlockBackend *blk;
+
+ pci_ide = PCI_IDE(dev);
+
+ for (i = aux ? 1 : 0; i < 4; i++) {
+ idebus = &pci_ide->bus[i / 2];
+ blk = idebus->ifs[i % 2].blk;
+
+ if (blk && idebus->ifs[i % 2].drive_kind != IDE_CD) {
+ if (!(i % 2)) {
+ idedev = idebus->master;
+ } else {
+ idedev = idebus->slave;
+ }
+
+ blk_drain(blk);
+ blk_flush(blk);
+
+ blk_detach_dev(blk, DEVICE(idedev));
+ idebus->ifs[i % 2].blk = NULL;
+ idedev->conf.blk = NULL;
+ monitor_remove_blk(blk);
+ blk_unref(blk);
+ }
+ }
+ qdev_reset_all(dev);
+}
+
static void unplug_disks(PCIBus *b, PCIDevice *d, void *opaque)
{
uint32_t flags = *(uint32_t *)opaque;
@@ -147,7 +193,7 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *opaque)
switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) {
case PCI_CLASS_STORAGE_IDE:
- pci_piix3_xen_ide_unplug(DEVICE(d), aux);
+ pci_xen_ide_unplug(DEVICE(d), aux);
break;
case PCI_CLASS_STORAGE_SCSI:
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index bc1b37512a..9a9b28078e 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -173,52 +173,6 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp)
}
}
-/*
- * The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
- * request unplug of 'aux' disks (which is stated to mean all IDE disks,
- * except the primary master).
- *
- * NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
- * is simultaneously requested is not clear. The implementation assumes
- * that an 'all' request overrides an 'aux' request.
- *
- * [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.pandoc
- */
-int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux)
-{
- PCIIDEState *pci_ide;
- int i;
- IDEDevice *idedev;
- IDEBus *idebus;
- BlockBackend *blk;
-
- pci_ide = PCI_IDE(dev);
-
- for (i = aux ? 1 : 0; i < 4; i++) {
- idebus = &pci_ide->bus[i / 2];
- blk = idebus->ifs[i % 2].blk;
-
- if (blk && idebus->ifs[i % 2].drive_kind != IDE_CD) {
- if (!(i % 2)) {
- idedev = idebus->master;
- } else {
- idedev = idebus->slave;
- }
-
- blk_drain(blk);
- blk_flush(blk);
-
- blk_detach_dev(blk, DEVICE(idedev));
- idebus->ifs[i % 2].blk = NULL;
- idedev->conf.blk = NULL;
- monitor_remove_blk(blk);
- blk_unref(blk);
- }
- }
- qdev_reset_all(dev);
- return 0;
-}
-
static void pci_piix_ide_exitfn(PCIDevice *dev)
{
PCIIDEState *d = PCI_IDE(dev);
diff --git a/include/hw/ide.h b/include/hw/ide.h
index c5ce5da4f4..60f1f4f714 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -8,9 +8,6 @@
ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
DriveInfo *hd0, DriveInfo *hd1);
-/* ide-pci.c */
-int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
-
/* ide-mmio.c */
void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1);
--
2.36.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
2022-05-13 18:09 ` [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug() Bernhard Beschow
@ 2022-05-19 14:37 ` Anthony PERARD via
2022-05-30 13:21 ` Philippe Mathieu-Daudé via
1 sibling, 0 replies; 14+ messages in thread
From: Anthony PERARD @ 2022-05-19 14:37 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-trivial, sstabellini, paul, xen-devel,
Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Richard Henderson, Eduardo Habkost, John Snow, open list:IDE
On Fri, May 13, 2022 at 08:09:57PM +0200, Bernhard Beschow wrote:
> This function was declared in a generic and public header, implemented
> in a device-specific source file but only used in xen_platform. Given its
> 'aux' parameter, this function is more xen-specific than piix-specific.
> Also, the hardcoded magic constants seem to be generic and related to
> PCIIDEState and IDEBus rather than piix.
>
> Therefore, move this function to xen_platform, unexport it, and drop the
> "piix3" in the function name as well.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
@ 2022-05-19 14:37 ` Anthony PERARD via
0 siblings, 0 replies; 14+ messages in thread
From: Anthony PERARD via @ 2022-05-19 14:37 UTC (permalink / raw)
To: Bernhard Beschow
Cc: qemu-devel, qemu-trivial, sstabellini, paul, xen-devel,
Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Richard Henderson, Eduardo Habkost, John Snow, open list:IDE
On Fri, May 13, 2022 at 08:09:57PM +0200, Bernhard Beschow wrote:
> This function was declared in a generic and public header, implemented
> in a device-specific source file but only used in xen_platform. Given its
> 'aux' parameter, this function is more xen-specific than piix-specific.
> Also, the hardcoded magic constants seem to be generic and related to
> PCIIDEState and IDEBus rather than piix.
>
> Therefore, move this function to xen_platform, unexport it, and drop the
> "piix3" in the function name as well.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
2022-05-13 18:09 ` [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug() Bernhard Beschow
@ 2022-05-30 13:21 ` Philippe Mathieu-Daudé via
2022-05-30 13:21 ` Philippe Mathieu-Daudé via
1 sibling, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-05-30 13:21 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel,
Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Richard Henderson, Eduardo Habkost, John Snow, open list:IDE
On 13/5/22 20:09, Bernhard Beschow wrote:
> This function was declared in a generic and public header, implemented
> in a device-specific source file but only used in xen_platform. Given its
> 'aux' parameter, this function is more xen-specific than piix-specific.
> Also, the hardcoded magic constants seem to be generic and related to
> PCIIDEState and IDEBus rather than piix.
>
> Therefore, move this function to xen_platform, unexport it, and drop the
> "piix3" in the function name as well.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Paul Durrant <paul@xen.org>
> ---
> hw/i386/xen/xen_platform.c | 48 +++++++++++++++++++++++++++++++++++++-
> hw/ide/piix.c | 46 ------------------------------------
> include/hw/ide.h | 3 ---
> 3 files changed, 47 insertions(+), 50 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
@ 2022-05-30 13:21 ` Philippe Mathieu-Daudé via
0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-05-30 13:21 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel
Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel,
Michael S. Tsirkin, Marcel Apfelbaum, Paolo Bonzini,
Richard Henderson, Eduardo Habkost, John Snow, open list:IDE
On 13/5/22 20:09, Bernhard Beschow wrote:
> This function was declared in a generic and public header, implemented
> in a device-specific source file but only used in xen_platform. Given its
> 'aux' parameter, this function is more xen-specific than piix-specific.
> Also, the hardcoded magic constants seem to be generic and related to
> PCIIDEState and IDEBus rather than piix.
>
> Therefore, move this function to xen_platform, unexport it, and drop the
> "piix3" in the function name as well.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Paul Durrant <paul@xen.org>
> ---
> hw/i386/xen/xen_platform.c | 48 +++++++++++++++++++++++++++++++++++++-
> hw/ide/piix.c | 46 ------------------------------------
> include/hw/ide.h | 3 ---
> 3 files changed, 47 insertions(+), 50 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/3] PIIX3-IDE XEN cleanup
2022-05-13 18:09 [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
` (2 preceding siblings ...)
2022-05-13 18:09 ` [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug() Bernhard Beschow
@ 2022-05-28 21:23 ` Bernhard Beschow
2022-06-02 21:30 ` Bernhard Beschow
3 siblings, 1 reply; 14+ messages in thread
From: Bernhard Beschow @ 2022-05-28 21:23 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel
Am 13. Mai 2022 18:09:54 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>v2:
>* Have pci_xen_ide_unplug() return void (Paul Durrant)
>* CC Xen maintainers (Michael S. Tsirkin)
>
>v1:
>This patch series first removes the redundant "piix3-ide-xen" device class and
>then moves a XEN-specific helper function from PIIX3 code to XEN code. The idea
>is to decouple PIIX3-IDE and XEN and to compile XEN-specific bits only if XEN
>support is enabled.
>
>Testing done:
>'qemu-system-x86_64 -M pc -m 1G -cdrom archlinux-2022.05.01-x86_64.iso" boots
>successfully and a 'poweroff' inside the VM also shuts it down correctly.
>
>XEN mode wasn't tested for the time being since its setup procedure seems quite
>sophisticated. Please let me know in case this is an obstacle.
>
>Bernhard Beschow (3):
> hw/ide/piix: Remove redundant "piix3-ide-xen" device class
> hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()
> include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
>
> hw/i386/pc_piix.c | 3 +--
> hw/i386/xen/xen_platform.c | 48 +++++++++++++++++++++++++++++++++++++-
> hw/ide/piix.c | 42 ---------------------------------
> include/hw/ide.h | 3 ---
> 4 files changed, 48 insertions(+), 48 deletions(-)
>
Ping
Whole series is reviewed/acked.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/3] PIIX3-IDE XEN cleanup
2022-05-28 21:23 ` [PATCH v2 0/3] PIIX3-IDE XEN cleanup Bernhard Beschow
@ 2022-06-02 21:30 ` Bernhard Beschow
0 siblings, 0 replies; 14+ messages in thread
From: Bernhard Beschow @ 2022-06-02 21:30 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, sstabellini, anthony.perard, paul, xen-devel,
Bernhard Beschow, Michael S. Tsirkin, Marcel Apfelbaum,
Paolo Bonzini, Richard Henderson, Eduardo Habkost, John Snow,
qemu-block
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
On Saturday, May 28, 2022, Bernhard Beschow <shentey@gmail.com> wrote:
> Am 13. Mai 2022 18:09:54 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>>v2:
>>* Have pci_xen_ide_unplug() return void (Paul Durrant)
>>* CC Xen maintainers (Michael S. Tsirkin)
>>
>>v1:
>>This patch series first removes the redundant "piix3-ide-xen" device
class and
>>then moves a XEN-specific helper function from PIIX3 code to XEN code.
The idea
>>is to decouple PIIX3-IDE and XEN and to compile XEN-specific bits only if
XEN
>>support is enabled.
>>
>>Testing done:
>>'qemu-system-x86_64 -M pc -m 1G -cdrom archlinux-2022.05.01-x86_64.iso"
boots
>>successfully and a 'poweroff' inside the VM also shuts it down correctly.
>>
>>XEN mode wasn't tested for the time being since its setup procedure seems
quite
>>sophisticated. Please let me know in case this is an obstacle.
>>
>>Bernhard Beschow (3):
>> hw/ide/piix: Remove redundant "piix3-ide-xen" device class
>> hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()
>> include/hw/ide: Unexport pci_piix3_xen_ide_unplug()
>>
>> hw/i386/pc_piix.c | 3 +--
>> hw/i386/xen/xen_platform.c | 48 +++++++++++++++++++++++++++++++++++++-
>> hw/ide/piix.c | 42 ---------------------------------
>> include/hw/ide.h | 3 ---
>> 4 files changed, 48 insertions(+), 48 deletions(-)
>>
>
> Ping
>
> Whole series is reviewed/acked.
Ping 2
[-- Attachment #2: Type: text/html, Size: 1847 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread