target-ppc: Change default machine for 64-bit
PATCH 1/1 target-ppc: Change default machine for 64-bit
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot, this is not very sensible. This patch changes the default machine to 'pseries', which is actively maintained and works well with most modern ppc64 Linux distributions as a guest.
Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case vl.c will print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.
--- hw/ppc/mac_newworld.c | 3 --- hw/ppc/spapr.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-)
hw/ppc/mac_newworld.c +0 -3
@@ -458,9 +458,6 @@ static QEMUMachine core99_machine = { .desc = "Mac99 based PowerMAC", .init = ppc_core99_init, .max_cpus = MAX_CPUS, -#ifdef TARGET_PPC64 - .is_default =1 , -#endif DEFAULT_MACHINE_OPTIONS, };
hw/ppc/spapr.c +1 -0
@@ -1348,6 +1348,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)static QEMUMachine spapr_machine = { .name ="pseries" , .desc ="pSeries Logical Partition (PAPR compliant)" , + .is_default =1 , .init = ppc_spapr_init, .reset = ppc_spapr_reset, .block_default_type =IF_SCSI ,
Signature · 1 line
1.7.10.4
Quoted 4 lines · David Gibson
Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case
vl.cwill print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.
What happened to the idea of having libfdt source in qemu ? That's a pretty common things with libfdt...
Cheers,
Ben.
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · David Gibson
Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case
vl.cwill print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.What happened to the idea of having libfdt source in qemu ? That's a pretty common things with libfdt...
Still floating out there. There was talk of making it a git submodule, but it hasn't happened yet.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Am 17.05.2013 um 10:47 schrieb David Gibson <[email protected]>:
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines · David Gibson
Quoted 4 lines
Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case
vl.cwill print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.
Quoted 5 lines
Quoted 2 lines
What happened to the idea of having libfdt source in qemu ? That's a pretty common things with libfdt...
Still floating out there. There was talk of making it a git submodule, but it hasn't happened yet.
Nack w/o libfdt in the tree, ack with it in the tree :).
Alex
Quoted 6 lines
Signature · 5 lines
-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 7 lines · David Gibson
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 4 lines · David Gibson
Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case
vl.cwill print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.
Quoted 5 lines
Quoted 2 lines
What happened to the idea of having libfdt source in qemu ? That's a pretty common things with libfdt...
Still floating out there. There was talk of making it a git submodule, but it hasn't happened yet.
No, the patches to make it a git submodule have gone in. If you configure with --enable-fdt and you don't have a system fdt then it should now prompt you how to pull in the submodule.
I'm planning to force --enable-fdt somehow for ARM targets in 1.6; only reason I didn't for 1.5 is that the libfdt code went in fairly late in the release cycle and I figured I'd let it bed in first.
If you're going to make the ppc64 default machine an fdt one you should probably force fdt for ppc too. (I'd suggest we forced it on for everything but the x86 folks would probably complain :-))
thanks
-- PMM
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 3 lines
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot,
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where are you seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
Andreas
Quoted 42 lines
this is not very sensible. This patch changes the
default machine to 'pseries', which is actively maintained and works well with most modern ppc64 Linux distributions as a guest.Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case
vl.cwill print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.Signed-off-by David Gibson <[email protected]>--- hw/ppc/mac_newworld.c | 3 --- hw/ppc/spapr.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-)hw/ppc/mac_newworld.c +0
-3@@ -458,9 +458,6 @@ static QEMUMachine core99_machine = { .desc = "Mac99 based PowerMAC", .init = ppc_core99_init, .max_cpus = MAX_CPUS, -#ifdef TARGET_PPC64 - .is_default =1 , -#endif DEFAULT_MACHINE_OPTIONS, };hw/ppc/spapr.c +1
-0@@ -1348,6 +1348,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)static QEMUMachine spapr_machine = { .name ="pseries" , .desc ="pSeries Logical Partition (PAPR compliant)" , + .is_default =1 , .init = ppc_spapr_init, .reset = ppc_spapr_reset, .block_default_type =IF_SCSI ,
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 9 lines · Andreas Färber
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 3 lines
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot,
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where are you seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
It certainly doesn't actually work properly and it emulates something that doesn't exist (ie. a G5 with Cuda for god sake :-)
pseries is much more useful and well maintained.
Cheers,
Ben.
Quoted 46 lines
Andreas
Quoted 42 lines
this is not very sensible. This patch changes the
default machine to 'pseries', which is actively maintained and works well with most modern ppc64 Linux distributions as a guest.Because the pseries machine type is optional (it is only built when libfdt is available), this can result in a build with no default machine. In that case
vl.cwill print a "No machine found" message. This seems reasonable, given that as mentioned, mac99 is unlikely to be a good choice.Signed-off-by David Gibson <[email protected]>--- hw/ppc/mac_newworld.c | 3 --- hw/ppc/spapr.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-)hw/ppc/mac_newworld.c +0
-3@@ -458,9 +458,6 @@ static QEMUMachine core99_machine = { .desc = "Mac99 based PowerMAC", .init = ppc_core99_init, .max_cpus = MAX_CPUS, -#ifdef TARGET_PPC64 - .is_default =1 , -#endif DEFAULT_MACHINE_OPTIONS, };hw/ppc/spapr.c +1
-0@@ -1348,6 +1348,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)static QEMUMachine spapr_machine = { .name ="pseries" , .desc ="pSeries Logical Partition (PAPR compliant)" , + .is_default =1 , .init = ppc_spapr_init, .reset = ppc_spapr_reset, .block_default_type =IF_SCSI ,
Quoted 9 lines · Andreas Färber
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 3 lines
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot,
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where are you seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
The mac99 machine for 64bit is actually worse than anything bitrot could give you. It emulates a machine that in its form never possibly could have existed in real hardware, which makes it very fragile and dependent on the guest's mercy to handle this gracefully.
Given the current state and amount of development on the pseries target, I think it makes sense to declare that as the default for qemu-system-ppc64.
I would still love to see -M mac99 emulate a proper U2 or U1 based system for 32bit. And I would also love to see a real U4 based emulation model come up for qemu-system-ppc64. But I doubt I'll have time to work on either :).
Alex
Quoted 12 lines · Alexander Graf
Quoted 9 lines · Andreas Färber
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 3 lines
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot,
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where are you seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
Quoted 4 lines
The mac99 machine for 64bit is actually worse than anything bitrot could give you. It emulates a machine that in its form never possibly could have existed in real hardware, which makes it very fragile and dependent on the guest's mercy to handle this gracefully.
I'll note that we have a CONFIG_PSERIES today. I'd suggest getting rid of it first before making pseries the default.
I still think spapr would be a better name than pseries FWIW since that's what it's referred to in the code.
Regards,
Anthony Liguori
Quoted 7 lines
Given the current state and amount of development on the pseries target, I think it makes sense to declare that as the default for qemu-system-ppc64.
I would still love to see -M mac99 emulate a proper U2 or U1 based system for 32bit. And I would also love to see a real U4 based emulation model come up for qemu-system-ppc64. But I doubt I'll have time to work on either :).
Alex
Quoted 17 lines · Anthony Liguori
Quoted 4 lines · Alexander Graf
Quoted 2 lines · Andreas Färber
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 1 line
Currently, for qemu-system-ppc64, the default machine type is
'mac99'.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Since the mac99 machine is not being actively maintained, and
shows quite
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
a few signs of bitrot,
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where
are you
Quoted 3 lines
Quoted 2 lines
seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
Quoted 8 lines
Quoted 2 lines
The mac99 machine for 64bit is actually worse than anything bitrot could give you. It emulates a machine that in its form never
possibly
Quoted 2 lines
could have existed in real hardware, which makes it very fragile and dependent on the guest's mercy to handle this gracefully.
I'll note that we have a
CONFIG_PSERIEStoday. I'd suggest getting rid of it first before making pseries the default.
Why? As long as it's present in the default ppc64 build, you'll have a default machine. If a user makes a custom config without it, presumably they know they want to run some other machine, so why do you need a default?
QEMU has too much mandatory stuff as is.
-Scott
Quoted 21 lines · Scott Wood
Quoted 20 lines · Anthony Liguori
Quoted 4 lines · Alexander Graf
Quoted 2 lines · Andreas Färber
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 1 line
Currently, for qemu-system-ppc64, the default machine type is
'mac99'.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Since the mac99 machine is not being actively maintained, and
shows quite
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
a few signs of bitrot,
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where
are you
Quoted 5 lines
Quoted 2 lines
seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
The mac99 machine for 64bit is actually worse than anything bitrot could give you. It emulates a machine that in its form never
possibly
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
could have existed in real hardware, which makes it very fragile and dependent on the guest's mercy to handle this gracefully.
I'll note that we have a
CONFIG_PSERIEStoday. I'd suggest getting rid
of it first before making pseries the default.Why?
I believe it's there only because libfdt used to be optional. libfdt is no longer optional.
Quoted 4 lines
As long as it's present in the default ppc64 build, you'll have a default machine. If a user makes a custom config without it, presumably they know they want to run some other machine, so why do you need a default?
That's fair.
Regards,
Anthony Liguori
Quoted 4 lines
QEMU has too much mandatory stuff as is.
-Scott
Quoted 2 lines · Anthony Liguori
I believe it's there only because libfdt used to be optional. libfdt is no longer optional.
Technically speaking those patches haven't actually been committed yet ;-) [partly because it needs a trivial fixup and I haven't either resent with the fix or stuffed it into arm-devs or some other tree, so my fault really.]
I was actually putting together a bunch of configury patches into a branch for possible submission as a pullreq today, including that one, but some of the stuff in that pullreq would clash with the aarch64 tcg pullreq currently on the list, so I'd prefer to wait for that to be committed first.
thanks
-- PMM
Am 13.06.2013 21:02, schrieb Anthony Liguori:
Quoted 10 lines
Quoted 6 lines · Scott Wood
Quoted 3 lines · Anthony Liguori
I'll note that we have a
CONFIG_PSERIEStoday. I'd suggest getting rid
of it first before making pseries the default.Why?
I believe it's there only because libfdt used to be optional.
Isn't that define rather related to pseries being ppc64-only?
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Am 13.06.2013 15:49, schrieb Alexander Graf:
Quoted 6 lines · Andreas Färber
Quoted 5 lines
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 3 lines
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot,
Quoted 6 lines
Quoted 4 lines
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where are you seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
The mac99 machine for 64bit is actually worse than anything bitrot could give you. It emulates a machine that in its form never possibly could have existed in real hardware, which makes it very fragile and dependent on the guest's mercy to handle this gracefully.
Still we should put that in the commit message and not "shows quite a few signs of bitrot". Bitrot is what gus.c and cs4231a.c may have endured while not being compiled in or those disabled DPRINTF()s sprinkled all over the code base.
Further, David is looking at this from a biased perspective: -M pseries is best maintained (apart from e500) ppc target, but it doesn't work with PR KVM (not on my box anyway). But neither does mac99 on KVM due to page sizes or something IIRC. However under TCG either is okay with the guests I've seen so far and they all compile warning-free.
pseries used to hang, that is no longer the case, it just doesn't do anything now - still need to debug how to improve that.
Quoted 1 line
Given the current state and amount of development on the pseries target, I think it makes sense to declare that as the default for qemu-system-ppc64.
No disagreement there then.
Andreas
Quoted 4 lines
I would still love to see -M mac99 emulate a proper U2 or U1 based system for 32bit. And I would also love to see a real U4 based emulation model come up for qemu-system-ppc64. But I doubt I'll have time to work on either :).
Alex
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 4 lines · Andreas Färber
Quoted 1 line
I would still love to see -M mac99 emulate a proper U2 or U1 based
system for 32bit. And I would also love to see a real U4 based emulation model come up for qemu-system-ppc64. But I doubt I'll have time to work on either :).
Uninorth itself is easy, the guests don't mess with it much, and we have the infrastructure for iommu's nowadays. KL is the interesting bit. The main missing piece of the puzzle is really a PMU device.
There are other bits in the chipset like GEM ethernet and the Frodo SATA but:
- They are probed using PCI probing, so not having them isn't a huge
deal.
- A GEM emulation shouldn't be terribly hard, there's bunch of
registers manipulated by the driver that we can probably just ignore.
- A Frodo emulation would be trivial considered that the driver
doesn't use anything but basic MMIO taskfile access (so does the MacOS driver) and a bit of SCRs.
Now if only I had more spare time ... :-)
Cheers,
Ben.
Quoted 25 lines · Andreas Färber
Am 13.06.2013 15:49, schrieb Alexander Graf:
Quoted 6 lines · Andreas Färber
Quoted 5 lines
Am 17.05.2013 06:25, schrieb David Gibson:
Quoted 3 lines
Currently, for qemu-system-ppc64, the default machine type is 'mac99'. Since the mac99 machine is not being actively maintained, and shows quite a few signs of bitrot,
Quoted 6 lines
Quoted 4 lines
Please be more specific than making such general claims in a commit message! As the default machine it certainly compiles, so where are you seeing bitrot? The DEC bridge cleanup that I once started kind of depends on the PCI cleanup you recently looked into.
The mac99 machine for 64bit is actually worse than anything bitrot could give you. It emulates a machine that in its form never possibly could have existed in real hardware, which makes it very fragile and dependent on the guest's mercy to handle this gracefully.
Still we should put that in the commit message and not "shows quite a few signs of bitrot". Bitrot is what
gus.candcs4231a.cmay have endured while not being compiled in or those disabled DPRINTF()s sprinkled all over the code base.Further, David is looking at this from a biased perspective: -M pseries is best maintained (apart from e500) ppc target, but it doesn't work with PR KVM (not on my box anyway). But neither does mac99 on KVM due to page sizes or something IIRC. However under TCG either is okay with the guests I've seen so far and they all compile warning-free.
Quoted 8 lines
pseries used to hang, that is no longer the case, it just doesn't do anything now - still need to debug how to improve that.
Quoted 1 line
Given the current state and amount of development on the pseries
target, I think it makes sense to declare that as the default for qemu-system-ppc64.
No disagreement there then.
Well, I've sent an updated version with a more accurate commit message to Alex Graf. It's also at git://github.com/dgibson/qemu.git,
ppc-next branch.
I do think that pseries is a better choice than mac99, but I tend to agree with Peter Maydell that the whole notion of a default machine is a bit silly. In any case, since I'm no longer actively working on qemu ppc, I don't really care enough to argue about it, so I guess it's up to Alex.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson