Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
8 user(s) are online (7 user(s) are browsing Forums)

Members: 0
Guests: 8

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 3 4 (5)
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Quite a regular
Quite a regular


See User information
I did some more benchmarking to get more understanding of the problem instead of trying to base solutions on theories. I've posted the results on the qemu-ppc mailing list Looks like dcbz isn't the biggest issue but AltiVec is. So for now you may get better results with -cpu g3 or some other G3 variant that don't use AltiVec. For accessing RAM AltiVec sometimes helps a little but for VRAM access it does not. For this dcbz isn't the biggest problem (for RAM access it's measureable though). I still don't know what AltiVec ops to check, I can get a disassembly and look at what opcodes are used but I don't really want to do that. Maybe if a smaller test case could be written with just one loop or even an assembly one that may be easier to check and optimise. By a quick look these don't use many AltiVec instructions though, most are different loads and I've seen vperm and nothing else so just checking how those are translated by QEMU might be enough but I let somebody else try to do that.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Quite a regular
Quite a regular


See User information
@joerg
Quote:
Firmware ENV variables:
Works on all systems, not only U-Boot ones even if the functions have UBoot in their names, and even on classic Amigas and Pegasos2 without NVRAM support (they use a special version of it and a kickstart module text file instead, but of course unlike the other implementations that's read-only):

As said before env variables aren't the most convenient way for QEMU. Adding a text config to kickstart.zip is much easier. These may be preffered on real machine but for QEMU it's not easily available or easy to set.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Home away from home
Home away from home


See User information
@balaton

Quote:
On real hardware sure but I meant for QEMU with vfio-pci. I don't even know if it would work currently so maybe it's not top priority over other possible improvements. But adding a config for it helps testing it in any case.


VFIO gives direct access to real hardware. Provided that the address mappings are set up correctly (i.e., the guest OS' physical addresses match the actual physical addresses), then GART would enable the GPU's DMA engines to read/write directly to RAM. That should make a difference.

For testing, GART was accidentally enabled in RadeonRX.chip v2.14 (at least for the Sam460). I can't remember if that one was released, or if we caught that during beta testing. Either way, anyone with access that version would be able to test. Eventuall v54.8 will make it to a public release.


Quote:
They say optimists are oblivious pessimists But it does look like from my perspective that your work is just going into a black hole...


Yes, Matthew (i.e., @amigakit) is very preoccupied with the A600GS and A1200GS, which slows down everything else. He's the bottleneck.

Bear in mind:
1. The VirtioGPU driver is a brand new product, which therefore requires extra work from @amigakit to release, and he's preoccupied with another project...
2. The Pegasos2 kernel patches are in ExecSG, and Hyperion is in charge of its release schedule. Hyperion is in a total mess right now, although work is happening behind-the-scenes
3. The RadeonHD/RX drivers are existing products, and releasing a new update takes a lot less work

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Home away from home
Home away from home


See User information
@joerg

Quote:
Using a kickstart module text file for config:
If you have access to the AmigaOS 4.x sources check for example my diskboot.kmod sources (Hyperion has no permission to use it anymore, but you can use the part of my sources parsing the config for your drivers).
IIRC it's something like...

Thanks, I'll take a look.

I wish that the uboot/firmware ENV variables were workable with QEMu, because that would be much simpler.

Quote:
@geennams's nearly 2 GB/s nvme.device benchmark result on the X5000 with PCIe x4 v2.0 is only a theoretical result, transferring 128 MB of data in a single DMA transfer is next to never done with real world DOS/filesystem operations.
Using 16 KB it's only 222 MB/s, and with the max. transfer size NGFS uses (128 KB) it's 450 MB/s.
I don't know anything about 3D GPUs, but I guess most GPU texture, etc. DMA transfers are quite small as well and not several MB at once either.

Hmmm. Looking at the lower-end results in his table (link), they're on the slow side for what I'd expect. PCIe overhead isn't so large that you need to transfer 10s to 100s of MB to get up to the GB/s transfer speeds. He probably has other overhead slowing things down.

We hit such overhead when using the CPU's DMA engines for WritePixelArray/ReadPixel array. The overhead of setting up blocks of RAM for DMA, and then unlocking them again added up. We still managed to get up to 1GB/s, depending on the CPU & GPU combo (e.g., this result).

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Not too shy to talk
Not too shy to talk


See User information
@balaton
Quote:
So for now you may get better results with -cpu g3 or some other G3 variant that don't use AltiVec

I don't know if I tested it correctly. I used the system as usual with apllications. I did not notice much difference.
Dry tests are -> https://hdrlab.org.nz/benchmark/gfxbench2d/OS/AmigaOS/Result/2941
I have no idea what values for cpu g3 would be significantly better.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Home away from home
Home away from home


See User information
@smarkusg

Look at the MemCopy tests. Those are the only ones that are affeced by G3 vs G4. Normally, a G4's memcopy results would be roughly 2x that of the G3, because the altivec instructions can move data in 128-bit blocks instead of max 64-bit like the FPU. That makes a big difference with PCIe.

On QEmu, it depends entirely how the altivec instructions are translated to the host machine's CPU (and how good the machine's PCIe controller is).

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Quite a regular
Quite a regular


See User information
You can follow the discussion on the qemu mailing list that I linked above. I did some profiling and the results are consistent with that. Looks like dcbz has very small impact. AltiVec load and store should do 128 bit ops when available but using vperm AltiVec op is also not optimal but still has only a few percent impact. Currently it is believed that the i/o operation is causing a recompile in the loop which is mainly causing the slow down but I don't know yet how to fix that and don't fully understand how QEMU handles it. So the results that not using AltiVec gives only about 1% speed increase is plausible as it does not remove the biggest bottleneck so the impact of AltiVec and dcbz is negligible to that.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Not too shy to talk
Not too shy to talk


See User information
Latest test : ASUS RX 560 Dual Fan OC 2 GB
https://www.techpowerup.com/gpu-specs/ ... 60-dual-fan-oc-2-gb.b5250
Currently runs slow on peg2 on amigaone emilation does not work.

The project is finished. I went back to the initial configuration with Asus Radeon HD 7750
The hardware works and will make a lot of fun
It is not fast in computing, but it is great for dealing with AmigaOS4.1 .. Hurra!
The cost is 35 euro - not the sdd disk and the case with power supply.


Edited by smarkusg on 2025/4/29 20:31:09
Edited by smarkusg on 2025/4/30 16:55:16
Edited by smarkusg on 2025/5/2 22:34:22
Edited by smarkusg on 2025/5/2 22:35:45
Edited by smarkusg on 2025/5/2 22:58:16
Edited by smarkusg on 2025/5/2 22:58:42
Edited by smarkusg on 2025/5/2 23:01:29
Edited by smarkusg on 2025/5/2 23:01:46
Edited by smarkusg on 2025/5/12 19:03:29
Edited by smarkusg on 2025/5/12 20:37:57
Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Not too shy to talk
Not too shy to talk


See User information
Many thanks to HunoPPC (Hugues Nouvel) for providing free VIP resources for my QEMU related project.
You are a great guy ‘chapeau bas!’ as are the guys from EntwicklerX.

Thank you all very much

HunoPPC probably needs no introduction. He has given permission to publish the test results.

<This topic will be continued>.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Not too shy to talk
Not too shy to talk


See User information
Leaving aside the subject of ‘game’ tests regarding the project, I checked and I am able to run the rtl8168 that is on my ‘GA-B75M-D3V’ board under AOS4 with PCI passthrough with QEMU.
Currently only on Peg2 via bios + boot

My screen
Resized Image

On the top right the directory to be created in ENV: rtl8169 driver
Below the lspci from linux and the command line.
In the ‘Mycommander’ window what values should be added to make the rtl8168 work with the rtl8169 driver under AOS4
On the left ‘Ranger’ with the interrupt settings.
Below a ping to a random page

On the emulation under A1 the settings in ‘Ranger’ for interrupts are missing. The system crashes when using the card unfortunately

Edit:
I have added a second screen.
In the first one, there was a command line from the qemu where rtl8139 was and a character error in the configuration which might have confused the result a bit

Resized Image


Edited by smarkusg on 2025/5/16 23:36:47
Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Quite a regular
Quite a regular


See User information
@smarkusg
I do the work in QEMU to make it possible and you with Maijestro get the VIP access? I don't care much about games but I would not mind VIP access to Enhancer or the RX drivers to be able to eventually test it. It's not likely I'd ever pay for it, I only payed for software that came with the hardware I bought, for everything else there are free software alternatives. But I don't have much time for it now anyway.

For the network card passthrough did I get that correctly that it work with pegasos2 but not with amigaone? What does the card info on the hardware tab show for it and the bboot output when booting compared to pegasos2? We also had to disable interrupt for the graphics card so there is some problem with that but I don't know yet what is it.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Not too shy to talk
Not too shy to talk


See User information
@balaton
Maybe someone will read this and give you ‘DEV’ access. - I am counting on it
Few people test QEMU and share bug reports.
If you had the right tools (drivers) it would be very useful for QEMU development under AOS4.


Yes - on Pegasos2 it works but....
It only works with ‘bios pegasos2.rom’. It does not matter if it boots from amigabot.of or bboot.fth
If I start the system with ‘kernel bboot’ the system starts, but immediately starts to die until it crashes/freezes.
The log shows that there is something wrong with irq

--
No CMI8738 found!
[peg2ide/irq_wait] timed out
[peg2ide/exec_pci_ata_cmd] <- here
[peg2ide/ata_rw_blocks] unit 0 lba28 read error 255, retries left : 4
[peg2ide/irq_wait] timed out
[peg2ide/exec_pci_ata_cmd] <- here
[peg2ide/ata_rw_blocks] unit 0 lba28 read error 255, retries left : 3
--


Topic A1.
The system starts without problems without the rj45 cable connected to the card.
As soon as I plug it in the system crashes/freezes.
No logs.
Looks like irq problem in QEMU emulation of A1
I have the rtl8169 card set up the same as sailor has (all addresses match)


link - > https://intuitionbase.com/sites/defaul ... 4.2-pci-full-00.0a.00.jpg
Pełny link do publikacji - >https://intuitionbase.com/articles/ami ... i-bus-hardware-interrupts


The driver in AOS4 doesn't seem to have an rtl8169 option to disable the interrupt. I don't know if it is possible to disable it.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Just can't stay away
Just can't stay away


See User information
@balaton

Quote:
balaton wrote:@smarkusg

I do the work in QEMU to make it possible and you with Maijestro get the VIP access? I don't care much about games but I would not mind VIP access to Enhancer or the RX drivers to be able to eventually test it. It's not likely I'd ever pay for it, I only payed for software that came with the hardware I bought, for everything else there are free software alternatives. But I don't have much time for it now anyway.


I'm not getting anything because I'm not concentrating on Qemu with passthrough at the moment and I don't have the hardware for it.

But yes I agree that you should be given some resources to further advance the Qemu/AmigaNG emulation. Here of course not the games would be interesting, but more access to drivers, it would be the least the community could do for the work you have already done.

We see that some developers are already using what you have provided us with and using it as a developer and test environment before testing it on real hardware. Steffen Häuser does the same and it works well as the emulation is already very accurate.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Quite a regular
Quite a regular


See User information
@smarkusg
If it only works with ROM then the card needs some init that BBoot does not do. Usually e.g. Linux can init the cards it has a driver for but AmigaOS relies on the firmware to init cards. The AmigaOne U-Boot should init cards too but maybe it's too old and does not recognise this card or only inits the card that's onboard which has a specific address as the article you linked shows. You could specify that address with -device vfio-pci,addr= to put the card where the onboard device should be and see if that changes anything with amigaone u-boot but only bboot won't work on amigaone either until we find out what's needed. You could compare the card infos in Ranger and logs from the driver when you booted with firmware or with only bboot and see what's missing. You still did not show what's your card settings and what interrupt it uses so I have no idea. The logs you posted refer to IDE interrupts so likely not related. If these only show up on boot when detecting IDE devices and never again after that then it's probably due to a QEMU issue that there seems to be an empty device on every port even when there isn't an ide-hd or ide-cd attached but when the guest tries to query it it won't respond so you get spurious warnings but then it's ignored aferwards so should not be a problem later. We have found this a few years ago, it is described in some message on the QEMU mailing list but since it does not cause other problems nobody fixed it.

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Not too shy to talk
Not too shy to talk


See User information
@balaton
Quote:
The AmigaOne U-Boot should init cards too but maybe it's too old and does not recognise this card or only inits the card that's onboard >which has a specific address as the article you linked shows. You could specify that address with -device vfio-pci,addr=

Maybe I wrote something wrong. I have the same settings as @sailor.

Resized Image

I set it as it is on the right hardware so that later there are no questions why I have different ones.
I also set the ‘vfio-pci,addr=’ settings as well. PCi Bus 1 does not work so far Qemu.There is no domukentation to ‘Articia’. I set it to 01.00.00 , to 01.01.00 and others too. It didn't do anything.
The card itself, without rj45 plugged in, can be seen to initiate. It says in the window ‘card with mac address xxxx is not currently able to connect to the internet’. The mac address is correct, so the driver itself works.
Initialisation of the card itself causes a freeze when rj45 is plugged in. Booting the system with rj45 plugged in causes the system to freeze at startup immediately.

Quote:
The logs you posted refer to IDE interrupts so likely not related.

I have never seen it or it shows up very sporadically. That's why it caught my attention and I posted it.

EDIT:

I have a question for the AOS4 experts. Is it possible to disable interrupts for using network cards in the system ?

Go to top
Re: Project - hardware to run AOS4 for 35 euro on QEMU 10 + GPU  passthrough
Quite a regular
Quite a regular


See User information
@smarkusg
It would be more interesting to find out what's the problem with interrupts and fix it as that should work better and faster. Disabling it is just a work around. Do the IDE interrupt logs show up without the network card or only with it? You have the same IRQ setting as in sailor's article but different card with different BARs. This may not matter but if we want to debug something it helps to look at relevant information not something similar only. I think to get further we would at least need BBoot output with and without firmware on pegasos2 and amigaone and see if there are some difference that could be fixed when running without firmware. For the IRQ more understanding is needed. I'm not sure how vfio works (and currently it's being changed so it may look different after a few commits so I wait until those are merged before trying to dig deeper) but maybe this has something to do with how interrupts are acknowledged with vfio-pci so it may ack an IRQ too soon or somehow mess up the IRQs in a way that AmigaOS can't handle. This works with Linux and Windows guests at least so it should be usable but maybe AmigaOS relies on something not emulated correctly or we have some problem specific to these PPC machines where I've missed some emulation of the IRQ handling (which is also possible as I don't understand all of the details of this). Does the passed through network card work with linux on amigaone and peagsos2? That would at least confirm the emulation is correct or might give some error that helps debugging it.

Go to top

  Register To Post
« 1 2 3 4 (5)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project