* [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost @ 2013-05-28 12:28 Amos Kong 2013-05-28 12:36 ` Paolo Bonzini 2013-05-28 22:59 ` Kevin O'Connor 0 siblings, 2 replies; 8+ messages in thread From: Amos Kong @ 2013-05-28 12:28 UTC (permalink / raw) To: kevin; +Cc: pbonzini, seabios, qemu-devel Bootindex string passed from qemu: /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline doesn't work if it uses q35 machine type. This patch fixes the pattern to match both original pc-i440fx & q35 Signed-off-by: Amos Kong <akong@redhat.com> --- src/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot.c b/src/boot.c index cd9d784..f30d47e 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] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-05-28 12:28 [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost Amos Kong @ 2013-05-28 12:36 ` Paolo Bonzini 2013-05-28 22:59 ` Kevin O'Connor 1 sibling, 0 replies; 8+ messages in thread From: Paolo Bonzini @ 2013-05-28 12:36 UTC (permalink / raw) To: Amos Kong; +Cc: kevin, seabios, qemu-devel Il 28/05/2013 14:28, Amos Kong ha scritto: > Bootindex string passed from qemu: > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > doesn't work if it uses q35 machine type. > > This patch fixes the pattern to match both original pc-i440fx & q35 > > Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > --- > src/boot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/boot.c b/src/boot.c > index cd9d784..f30d47e 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) > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-05-28 12:28 [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost Amos Kong 2013-05-28 12:36 ` Paolo Bonzini @ 2013-05-28 22:59 ` Kevin O'Connor 2013-05-29 2:33 ` Amos Kong 1 sibling, 1 reply; 8+ messages in thread From: Kevin O'Connor @ 2013-05-28 22:59 UTC (permalink / raw) To: Amos Kong; +Cc: pbonzini, seabios, qemu-devel On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > Bootindex string passed from qemu: > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > doesn't work if it uses q35 machine type. > > This patch fixes the pattern to match both original pc-i440fx & q35 > > Signed-off-by: Amos Kong <akong@redhat.com> > --- > src/boot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/boot.c b/src/boot.c > index cd9d784..f30d47e 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" The seabios pattern matching code isn't that sophisticated - I think this could end up doing something unexpected. Why does it need to change? -Kevin ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-05-28 22:59 ` Kevin O'Connor @ 2013-05-29 2:33 ` Amos Kong 2013-05-30 1:25 ` Kevin O'Connor 2013-06-02 14:29 ` [Qemu-devel] [SeaBIOS] " Gleb Natapov 0 siblings, 2 replies; 8+ messages in thread From: Amos Kong @ 2013-05-29 2:33 UTC (permalink / raw) To: Kevin O'Connor; +Cc: pbonzini, seabios, qemu-devel, Michael S. Tsirkin On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > Bootindex string passed from qemu: > > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > > doesn't work if it uses q35 machine type. > > > > This patch fixes the pattern to match both original pc-i440fx & q35 > > > > Signed-off-by: Amos Kong <akong@redhat.com> > > --- > > src/boot.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/boot.c b/src/boot.c > > index cd9d784..f30d47e 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" > > The seabios pattern matching code isn't that sophisticated - I think > this could end up doing something unexpected. Why does it need to > change? If we start a guest with default machine type (pc-i440fx), the prefix of bootindex string is "/pci@i0cf8", if we start guest with -M q35, the prefix will become "/q35-pcihost@i0cf8". We only match "/pci@i0cf8" in seabios, it causes boot priority of q35 devices could not be changed. We could not change TYPE_Q35_HOST_DEVICE to 'pci' in qemu to adapt seabios, so fix the pattern. | qemu/include/hw/pci-host/q35.h:#define TYPE_Q35_HOST_DEVICE "q35-pcihost" I see glob_prefix() is not powerful, "/*pci*@i0cf8" & "/*@i0cf8" all work. Or change TYPE_Q35_HOST_DEVICE to "pci-q35" in qemu, and use "/pci*@i0cf8" in seabios ? > -Kevin -- Amos. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-05-29 2:33 ` Amos Kong @ 2013-05-30 1:25 ` Kevin O'Connor 2013-06-02 14:29 ` [Qemu-devel] [SeaBIOS] " Gleb Natapov 1 sibling, 0 replies; 8+ messages in thread From: Kevin O'Connor @ 2013-05-30 1:25 UTC (permalink / raw) To: Amos Kong; +Cc: pbonzini, seabios, qemu-devel, Michael S. Tsirkin On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > -#define FW_PCI_DOMAIN "/pci@i0cf8" > > > +#define FW_PCI_DOMAIN "/*pci*@i0cf8" > > > > The seabios pattern matching code isn't that sophisticated - I think > > this could end up doing something unexpected. Why does it need to > > change? > > If we start a guest with default machine type (pc-i440fx), the prefix > of bootindex string is "/pci@i0cf8", if we start guest with -M q35, > the prefix will become "/q35-pcihost@i0cf8". > > We only match "/pci@i0cf8" in seabios, it causes boot priority of q35 > devices could not be changed. > > We could not change TYPE_Q35_HOST_DEVICE to 'pci' in qemu to adapt > seabios, so fix the pattern. It really can't be changed? > I see glob_prefix() is not powerful, "/*pci*@i0cf8" & "/*@i0cf8" all > work. > > Or change TYPE_Q35_HOST_DEVICE to "pci-q35" in qemu, and use > "/pci*@i0cf8" in seabios ? That would be preferable. -Kevin ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-05-29 2:33 ` Amos Kong 2013-05-30 1:25 ` Kevin O'Connor @ 2013-06-02 14:29 ` Gleb Natapov 2013-06-02 14:59 ` Michael S. Tsirkin 1 sibling, 1 reply; 8+ messages in thread From: Gleb Natapov @ 2013-06-02 14:29 UTC (permalink / raw) To: Amos Kong Cc: pbonzini, Kevin O'Connor, seabios, qemu-devel, Michael S. Tsirkin On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > Bootindex string passed from qemu: > > > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > > > > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > > > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > > > doesn't work if it uses q35 machine type. > > > > > > This patch fixes the pattern to match both original pc-i440fx & q35 > > > > > > Signed-off-by: Amos Kong <akong@redhat.com> > > > --- > > > src/boot.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/src/boot.c b/src/boot.c > > > index cd9d784..f30d47e 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" > > > > The seabios pattern matching code isn't that sophisticated - I think > > this could end up doing something unexpected. Why does it need to > > change? > > If we start a guest with default machine type (pc-i440fx), the prefix > of bootindex string is "/pci@i0cf8", if we start guest with -M q35, > the prefix will become "/q35-pcihost@i0cf8". > > We only match "/pci@i0cf8" in seabios, it causes boot priority of q35 > devices could not be changed. > > We could not change TYPE_Q35_HOST_DEVICE to 'pci' in qemu to adapt > seabios, so fix the pattern. > Why couldn't we? QEMU not been able to generate proper device string is QEMU bug. -- Gleb. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-06-02 14:29 ` [Qemu-devel] [SeaBIOS] " Gleb Natapov @ 2013-06-02 14:59 ` Michael S. Tsirkin 2013-06-02 15:39 ` Gleb Natapov 0 siblings, 1 reply; 8+ messages in thread From: Michael S. Tsirkin @ 2013-06-02 14:59 UTC (permalink / raw) To: Gleb Natapov; +Cc: pbonzini, Kevin O'Connor, Amos Kong, seabios, qemu-devel On Sun, Jun 02, 2013 at 05:29:45PM +0300, Gleb Natapov wrote: > On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > > Bootindex string passed from qemu: > > > > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > > > > > > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > > > > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > > > > doesn't work if it uses q35 machine type. > > > > > > > > This patch fixes the pattern to match both original pc-i440fx & q35 > > > > > > > > Signed-off-by: Amos Kong <akong@redhat.com> > > > > --- > > > > src/boot.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/src/boot.c b/src/boot.c > > > > index cd9d784..f30d47e 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" > > > > > > The seabios pattern matching code isn't that sophisticated - I think > > > this could end up doing something unexpected. Why does it need to > > > change? > > > > If we start a guest with default machine type (pc-i440fx), the prefix > > of bootindex string is "/pci@i0cf8", if we start guest with -M q35, > > the prefix will become "/q35-pcihost@i0cf8". > > > > We only match "/pci@i0cf8" in seabios, it causes boot priority of q35 > > devices could not be changed. > > > > We could not change TYPE_Q35_HOST_DEVICE to 'pci' in qemu to adapt > > seabios, so fix the pattern. > > > Why couldn't we? QEMU not been able to generate proper device string is > QEMU bug. > > -- > Gleb. I applied a patch that does just that. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost 2013-06-02 14:59 ` Michael S. Tsirkin @ 2013-06-02 15:39 ` Gleb Natapov 0 siblings, 0 replies; 8+ messages in thread From: Gleb Natapov @ 2013-06-02 15:39 UTC (permalink / raw) To: Michael S. Tsirkin Cc: pbonzini, Kevin O'Connor, Amos Kong, seabios, qemu-devel On Sun, Jun 02, 2013 at 05:59:04PM +0300, Michael S. Tsirkin wrote: > On Sun, Jun 02, 2013 at 05:29:45PM +0300, Gleb Natapov wrote: > > On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > > > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > > > Bootindex string passed from qemu: > > > > > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > > > > > > > > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > > > > > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > > > > > doesn't work if it uses q35 machine type. > > > > > > > > > > This patch fixes the pattern to match both original pc-i440fx & q35 > > > > > > > > > > Signed-off-by: Amos Kong <akong@redhat.com> > > > > > --- > > > > > src/boot.c | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/src/boot.c b/src/boot.c > > > > > index cd9d784..f30d47e 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" > > > > > > > > The seabios pattern matching code isn't that sophisticated - I think > > > > this could end up doing something unexpected. Why does it need to > > > > change? > > > > > > If we start a guest with default machine type (pc-i440fx), the prefix > > > of bootindex string is "/pci@i0cf8", if we start guest with -M q35, > > > the prefix will become "/q35-pcihost@i0cf8". > > > > > > We only match "/pci@i0cf8" in seabios, it causes boot priority of q35 > > > devices could not be changed. > > > > > > We could not change TYPE_Q35_HOST_DEVICE to 'pci' in qemu to adapt > > > seabios, so fix the pattern. > > > > > Why couldn't we? QEMU not been able to generate proper device string is > > QEMU bug. > > > > -- > > Gleb. > > > I applied a patch that does just that. I noticed :) I have many emails to read :( -- Gleb. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-02 15:39 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-28 12:28 [Qemu-devel] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost Amos Kong 2013-05-28 12:36 ` Paolo Bonzini 2013-05-28 22:59 ` Kevin O'Connor 2013-05-29 2:33 ` Amos Kong 2013-05-30 1:25 ` Kevin O'Connor 2013-06-02 14:29 ` [Qemu-devel] [SeaBIOS] " Gleb Natapov 2013-06-02 14:59 ` Michael S. Tsirkin 2013-06-02 15:39 ` Gleb Natapov
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).