* [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35
@ 2013-05-30 2:47 Amos Kong
2013-05-30 2:51 ` [Qemu-devel] [SeaBIOS PATCH v2] boot: fix fw_dev_path pattern to match q35 Amos Kong
2013-05-30 6:09 ` [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Michael S. Tsirkin
0 siblings, 2 replies; 4+ messages in thread
From: Amos Kong @ 2013-05-30 2:47 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, kevin, seabios, aliguori, mst
In QEMU, we set the firmware name of pc-i440fx is 'pci', and set the
firmware name of q35 is 'q35-pcihost'.
The seabios pattern matching code isn't sophisticated, and we want to
match those two devices with exact pattern.
This patch changes the typename of q35 to 'pci-q35', all pci devices
use same prefix 'pci' in fireware name. And I will change pattern in
seabios to "/pci*@i0cf8".
Signed-off-by: Amos Kong <akong@redhat.com>
---
include/hw/pci-host/q35.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index e182c82..3579fb0 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -34,7 +34,7 @@
#include "hw/acpi/ich9.h"
#include "hw/pci-host/pam.h"
-#define TYPE_Q35_HOST_DEVICE "q35-pcihost"
+#define TYPE_Q35_HOST_DEVICE "pci-q35"
#define Q35_HOST_DEVICE(obj) \
OBJECT_CHECK(Q35PCIHost, (obj), TYPE_Q35_HOST_DEVICE)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [SeaBIOS PATCH v2] boot: fix fw_dev_path pattern to match q35
2013-05-30 2:47 [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Amos Kong
@ 2013-05-30 2:51 ` Amos Kong
2013-05-30 6:09 ` [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Michael S. Tsirkin
1 sibling, 0 replies; 4+ messages in thread
From: Amos Kong @ 2013-05-30 2:51 UTC (permalink / raw)
To: seabios, kevin; +Cc: pbonzini, aliguori, qemu-devel, mst
We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix
of q35 is "/q35-pcihost@i0cf8". It causes boot priority of q35 devices
could not be changed by bootindex parameter in QEMU.
I have a patch to change typename of q35 to 'pci-q35', this patch fixes
the pattern to match both pc-i440fx and q35.
Signed-off-by: Amos Kong <akong@redhat.com>
---
v2: use exact pattern
---
src/boot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/boot.c b/src/boot.c
index c308602..300ecc3 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -97,7 +97,7 @@ find_prio(const char *glob)
return -1;
}
-#define FW_PCI_DOMAIN "/pci@i0cf8"
+#define FW_PCI_DOMAIN "/pci*@i0cf8"
static char *
build_pci_path(char *buf, int max, const char *devname, struct pci_device *pci)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35
2013-05-30 2:47 [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Amos Kong
2013-05-30 2:51 ` [Qemu-devel] [SeaBIOS PATCH v2] boot: fix fw_dev_path pattern to match q35 Amos Kong
@ 2013-05-30 6:09 ` Michael S. Tsirkin
2013-05-30 7:27 ` Amos Kong
1 sibling, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2013-05-30 6:09 UTC (permalink / raw)
To: Amos Kong; +Cc: pbonzini, kevin, seabios, qemu-devel, aliguori
On Thu, May 30, 2013 at 10:47:48AM +0800, Amos Kong wrote:
> In QEMU, we set the firmware name of pc-i440fx is 'pci', and set the
> firmware name of q35 is 'q35-pcihost'.
>
> The seabios pattern matching code isn't sophisticated, and we want to
> match those two devices with exact pattern.
>
> This patch changes the typename of q35 to 'pci-q35', all pci devices
> use same prefix 'pci' in fireware name. And I will change pattern in
> seabios to "/pci*@i0cf8".
>
> Signed-off-by: Amos Kong <akong@redhat.com>
Let's just not leak name to the guest - there's no reason to.
Won't the following address the issue without bios changes?
Maybe we should find some way to set fw_name in hw/pci/pci_host.c,
worth looking into.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 8467f86..24df6b5 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -76,6 +76,7 @@ static void q35_host_class_init(ObjectClass *klass, void *data)
k->init = q35_host_init;
dc->props = mch_props;
+ dc->fw_name = "pci";
}
static void q35_host_initfn(Object *obj)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35
2013-05-30 6:09 ` [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Michael S. Tsirkin
@ 2013-05-30 7:27 ` Amos Kong
0 siblings, 0 replies; 4+ messages in thread
From: Amos Kong @ 2013-05-30 7:27 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: pbonzini, kevin, seabios, qemu-devel, aliguori
On Thu, May 30, 2013 at 09:09:05AM +0300, Michael S. Tsirkin wrote:
> On Thu, May 30, 2013 at 10:47:48AM +0800, Amos Kong wrote:
> > In QEMU, we set the firmware name of pc-i440fx is 'pci', and set the
> > firmware name of q35 is 'q35-pcihost'.
> >
> > The seabios pattern matching code isn't sophisticated, and we want to
> > match those two devices with exact pattern.
> >
> > This patch changes the typename of q35 to 'pci-q35', all pci devices
> > use same prefix 'pci' in fireware name. And I will change pattern in
> > seabios to "/pci*@i0cf8".
> >
> > Signed-off-by: Amos Kong <akong@redhat.com>
>
> Let's just not leak name to the guest - there's no reason to.
>
> Won't the following address the issue without bios changes?
> Maybe we should find some way to set fw_name in hw/pci/pci_host.c,
> worth looking into.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> ---
>
>
> diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
> index 8467f86..24df6b5 100644
> --- a/hw/pci-host/q35.c
> +++ b/hw/pci-host/q35.c
> @@ -76,6 +76,7 @@ static void q35_host_class_init(ObjectClass *klass, void *data)
>
> k->init = q35_host_init;
> dc->props = mch_props;
> + dc->fw_name = "pci";
It's a light change, works with current seabios.
> }
>
> static void q35_host_initfn(Object *obj)
--
Amos.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-30 7:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 2:47 [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Amos Kong
2013-05-30 2:51 ` [Qemu-devel] [SeaBIOS PATCH v2] boot: fix fw_dev_path pattern to match q35 Amos Kong
2013-05-30 6:09 ` [Qemu-devel] [PATCH] pci: change typename of q35 to pci-q35 Michael S. Tsirkin
2013-05-30 7:27 ` Amos Kong
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).