[RFC 1/1] hw/input: add basic support for a PCI PS/2 controller

2023-05-19 Thread Liav Albani
The linux pcips2 driver is responsible for driving this device. Signed-off-by: Liav Albani --- hw/i386/Kconfig | 1 + hw/input/Kconfig | 5 + hw/input/meson.build | 2 + hw/input/ps2pci.c | 282 ++ include/hw/input

[RFC 0/1] hw/input: add basic support for a PCI PS/2 controller

2023-05-19 Thread Liav Albani
sues in PS/2 core (in Linux) and improving the pcips2 driver code in Linux as well. Liav Albani (1): hw/input: add basic support for a PCI PS/2 controller hw/i386/Kconfig | 1 + hw/input/Kconfig | 5 + hw/input/meson.build | 2 + hw/input/ps2pci.c | 282 +

Re: [PATCH 0/1] hw/ide: share bmdma read and write functions

2023-01-18 Thread Liav Albani
On 1/16/23 22:29, John Snow wrote: On Fri, Jan 13, 2023 at 9:10 AM Liav Albani wrote: On 1/11/23 01:07, Bernhard Beschow wrote: Am 9. Januar 2023 19:24:16 UTC schrieb John Snow : On Tue, Sep 6, 2022 at 10:27 AM Bernhard Beschow wrote: Am

Re: [PATCH 0/1] hw/ide: share bmdma read and write functions

2023-01-13 Thread Liav Albani
On 1/11/23 01:07, Bernhard Beschow wrote: Am 9. Januar 2023 19:24:16 UTC schrieb John Snow : On Tue, Sep 6, 2022 at 10:27 AM Bernhard Beschow wrote: Am 19. Februar 2022 08:08:17 UTC schrieb Liav Albani

Re: [PATCH 0/1] hw/display: expose linear framebuffer address in Bochs VBE registers

2022-09-21 Thread Liav Albani
On 9/21/22 09:14, Gerd Hoffmann wrote: Nope. Even if you fix the framebuffer address conflict you still have the io address conflict. Yeah, that is why I explicitly said that this is needed to be fixed as well in later patches. Yep. That's why isa-pc is pretty much unused these days. Well

[PATCH 1/1] hw/display: expose linear framebuffer address in Bochs VBE registers

2022-09-20 Thread Liav Albani
This is quite useful on the isa-vga device, because it lets guest drivers to determine where is the framebuffer located in physical memory instead of blindly hardcoding an address. It also allows future movements of the framebuffer to other locations. Signed-off-by: Liav Albani --- hw/display

[PATCH 0/1] hw/display: expose linear framebuffer address in Bochs VBE registers

2022-09-20 Thread Liav Albani
t I bump up the Bochs VBE version number, which could be questionable with how the feature might be insignificant for many guest OSes out there. Liav Albani (1): hw/display: expose linear framebuffer address in Bochs VBE registers hw/display/bochs-display.c | 10 +-

Re: [PATCH v2] hw/display: load the correct ROM file for isa-vga device

2022-09-17 Thread Liav Albani
On 9/17/22 17:40, Liav Albani wrote: On 9/17/22 17:32, Liav Albani wrote: diff --git a/pc-bios/meson.build b/pc-bios/meson.build index 388e0db6e4..6af94a4a0a 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -29,7 +29,7 @@ blobs = [     'bios-microvm.bin',    

Re: [PATCH v2] hw/display: load the correct ROM file for isa-vga device

2022-09-17 Thread Liav Albani
On 9/17/22 17:32, Liav Albani wrote: diff --git a/pc-bios/meson.build b/pc-bios/meson.build index 388e0db6e4..6af94a4a0a 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -29,7 +29,7 @@ blobs = [ 'bios-microvm.bin', 'qboot.rom', 'sgab

[PATCH v2] hw/display: load the correct ROM file for isa-vga device

2022-09-17 Thread Liav Albani
se of failing to continue booting. The build name of the vgabios.bin is changed too, to vgabios-isavga.bin to ensure we always have that file when QEMU is installed as a package or compiled from source. Signed-off-by: Liav Albani --- hw/display/vga-isa.c | 2 +- hw/display/vga_int.h | 2 +- pc

Re: [PATCH] hw/display: load the correct ROM file for isa-vga device

2022-09-17 Thread Liav Albani
On 9/17/22 17:06, Liav Albani wrote: Apparently we didn't load the correct ROM file when using the isa-vga device, which resulted in a display waiting to be initialized by a guest OS kernel. With this fix, SeaBIOS is able to print vital data to a text mode console during boot, which is u

[PATCH] hw/display: load the correct ROM file for isa-vga device

2022-09-17 Thread Liav Albani
oting. Signed-off-by: Liav Albani --- hw/display/vga-isa.c | 2 +- hw/display/vga_int.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index 46abbc5653..bcf646d012 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@

Re: [PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-02 Thread Liav Albani
but I feel quoting spec and including table name is a good idea actually, but pls quote verbatim: I don't do that and don't ask it from others. The reason being that pointing where to look in spec and having verbatim copy of field name is sufficient for looking it up and QEMU does not endup wit

Re: [PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-02 Thread Liav Albani
On 3/2/22 14:42, Michael S. Tsirkin wrote: On Wed, Mar 02, 2022 at 10:44:03AM +0530, Ani Sinha wrote: On Wed, Mar 2, 2022 at 12:50 AM Liav Albani wrote: On 3/1/22 11:52, Ani Sinha wrote: On Tue, 1 Mar 2022, Igor Mammedov wrote: On Mon, 28 Feb 2022 22:17:32 +0200 Liav Albani wrote

Re: [PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-01 Thread Liav Albani
On 3/1/22 11:52, Ani Sinha wrote: On Tue, 1 Mar 2022, Igor Mammedov wrote: On Mon, 28 Feb 2022 22:17:32 +0200 Liav Albani wrote: This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the contr

Re: [PATCH v4 3/3] tests/acpi: i386: update FACP table differences

2022-03-01 Thread Liav Albani
On 3/1/22 13:21, Michael S. Tsirkin wrote: On Tue, Mar 01, 2022 at 08:29:57AM +0530, Ani Sinha wrote: On Mon, 28 Feb 2022, Liav Albani wrote: After changing the IAPC boot flags register to indicate support of i8042 in the machine chipset to help the guest OS to determine its existence

Re: [PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-01 Thread Liav Albani
On 3/1/22 13:19, Michael S. Tsirkin wrote: On Tue, Mar 01, 2022 at 09:43:54AM +0100, Igor Mammedov wrote: On Mon, 28 Feb 2022 22:17:32 +0200 Liav Albani wrote: This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need

[PATCH v4 3/3] tests/acpi: i386: update FACP table differences

2022-02-28 Thread Liav Albani
0: 01 20 00 00 08 06 00 00 00 00 00 00 01 80 00 00 // . .. 00E0: 20 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ... 00F0: 00 00 00 00 // ** Signed-off-by: Liav Albani --- tests/data/acpi/q35/FACP| Bi

[PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-28 Thread Liav Albani
as it uses FACP ACPI table with revision higher than 1, which should implement at least ACPI 2.0 features within the table, hence it can also set the IA-PC boot flags register according to the ACPI 2.0 specification. Signed-off-by: Liav Albani --- hw/acpi/aml-build.c | 11 ++- hw

[PATCH v4 1/3] tests/acpi: i386: allow FACP acpi table changes

2022-02-28 Thread Liav Albani
The FACP table is going to be changed for x86/q35 machines. To be sure the following changes are not breaking any QEMU test this change follows step 2 from the bios-tables-test.c guide on changes that affect ACPI tables. Signed-off-by: Liav Albani --- tests/qtest/bios-tables-test-allowed-diff.h

[PATCH v4 0/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-28 Thread Liav Albani
e, as a developer of the SerenityOS kernel, I might want to allow people to not try to decode the ACPI AML namespace (for now, we still don't support ACPI AML as it's a work in progress), but still to not probe for the i8042 but just use it after looking in the IA-PC boot flags in the AC

Re: [PATCH v3 1/4] hw/isa: add function to check for existence of device by its type

2022-02-27 Thread Liav Albani
On 2/27/22 09:27, Ani Sinha wrote: On Sat, 26 Feb 2022, Liav Albani wrote: This function enumerates all attached ISA devices in the machine, and tries to compare a given device type name to the enumerated devices. For example, this can help other code to determine if a i8042 controller

Re: [PATCH v3 3/4] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-27 Thread Liav Albani
On 2/27/22 08:56, Ani Sinha wrote: On Sat, 26 Feb 2022, Liav Albani wrote: This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumeratin

Re: [PATCH v3 3/4] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-27 Thread Liav Albani
On 2/27/22 12:48, Bernhard Beschow wrote: Am 26. Februar 2022 06:30:18 UTC schrieb Liav Albani : This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immedi

[PATCH v3 4/4] tests/acpi: i386: update FACP table differences

2022-02-25 Thread Liav Albani
0: 01 20 00 00 08 06 00 00 00 00 00 00 01 80 00 00 // . .. 00E0: 20 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ... 00F0: 00 00 00 00 // ** Signed-off-by: Liav Albani --- tests/data/acpi/q35/FACP| Bi

[PATCH v3 3/4] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-25 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. Signed-off-by: Liav Albani --- hw/acpi/aml-bu

[PATCH v3 2/4] tests/acpi: i386: allow FACP acpi table changes

2022-02-25 Thread Liav Albani
The FACP table is going to be changed for x86/q35 machines. To be sure the following changes are not breaking any QEMU test this change follows step 2 from the bios-tables-test.c guide on changes that affect ACPI tables. Signed-off-by: Liav Albani --- tests/qtest/bios-tables-test-allowed-diff.h

[PATCH v3 1/4] hw/isa: add function to check for existence of device by its type

2022-02-25 Thread Liav Albani
This function enumerates all attached ISA devices in the machine, and tries to compare a given device type name to the enumerated devices. For example, this can help other code to determine if a i8042 controller exists in the machine. Signed-off-by: Liav Albani --- hw/isa/isa-bus.c | 23

[PATCH v3 0/4] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-25 Thread Liav Albani
ence function but return FALSE gracefully. If someone thinks this is wrong, I'm more than happy to discuss and fix the code :) Liav Albani (4): hw/isa: add function to check for existence of device by its type tests/acpi: i386: allow FACP acpi table changes hw/acpi: add indication for i8

Re: [PATCH v2 2/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-21 Thread Liav Albani
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ebd47aa26f..5dc625b8d8 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -192,6 +192,11 @@ static void init_common_fadt_data(MachineState *ms, Object *o, .address = object_property_get_uint(o, ACPI_PM_PROP_

[PATCH v2 2/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-21 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. Signed-off-by: Liav Albani --- hw/acpi/aml-bu

[PATCH v2 1/2] hw/isa: add function to check for existence of device by its type

2022-02-21 Thread Liav Albani
This function enumerates all attached ISA devices in the machine, and tries to compare a given device type name to the enumerated devices. For example, this can help other code to determine if a i8042 controller exists in the machine. Signed-off-by: Liav Albani --- hw/isa/isa-bus.c | 23

[PATCH v2 0/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-21 Thread Liav Albani
ence function but return FALSE gracefully. If someone thinks this is wrong, I'm more than happy to discuss and fix the code :) Liav Albani (2): hw/isa: add function to check for existence of device by its type hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

Re: [PATCH v2 2/2] hw/ide: add ich6 ide controller device emulation

2022-02-21 Thread Liav Albani
On 2/21/22 13:33, Gerd Hoffmann wrote: Hi, ICH6 and ICH7 IDE controllers are quite the same as far as I know. I could change it, but then one could argue that the name ich6-ide seems like "ich9-ide", so not sure if we can really go on this path. I think we don't actually have ich9-ide, we

[PATCH 2/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-20 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. Signed-off-by: Liav Albani --- hw/acpi/aml-bu

[PATCH 1/2] hw/isa: add function to check for existence of device by its type

2022-02-20 Thread Liav Albani
Signed-off-by: Liav Albani --- hw/isa/isa-bus.c | 17 + include/hw/isa/isa.h | 1 + 2 files changed, 18 insertions(+) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 6c31398dda..39d1768797 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -222,6 +222,23 @@ void

[PATCH 0/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-20 Thread Liav Albani
e, as a developer of the SerenityOS kernel, I might want to allow people to not try to decode the ACPI AML namespace (for now, we still don't support ACPI AML as it's a work in progress), but still to not probe for the i8042 but just use it after looking in the IA-PC boot flags in the AC

Re: [PATCH 1/1] hw/ide: share bmdma read and write functions between piix.c and via.c

2022-02-19 Thread Liav Albani
(and remove code duplications) but also let's do that correctly, to ensure that in the view of the developer that uses the debug messages, it all seem clear and neat :) but I wasn't sure that won't change anything so may need a bit more thought.

Re: [PATCH 1/1] hw/ide: share bmdma read and write functions between piix.c and via.c

2022-02-19 Thread Liav Albani
On 2/19/22 13:19, BALATON Zoltan wrote: On Sat, 19 Feb 2022, Liav Albani wrote: Instead of letting each implementation to duplicate this code, we can share these functions between IDE PIIX3/4 and VIA implementations. OK but there's a way to take this even further as cmd646 also

[PATCH 1/1] hw/ide: share bmdma read and write functions between piix.c and via.c

2022-02-19 Thread Liav Albani
Instead of letting each implementation to duplicate this code, we can share these functions between IDE PIIX3/4 and VIA implementations. Signed-off-by: Liav Albani --- hw/ide/pci.c | 47 hw/ide/piix.c| 50

[PATCH 0/1] hw/ide: share bmdma read and write functions

2022-02-19 Thread Liav Albani
6-ide patch by just using the already separated functions. This was suggested by BALATON Zoltan when he submitted a code review on my ich6-ide controller emulation patch. Liav Albani (1): hw/ide: share bmdma read and write functions between piix.c and via.c hw/ide/pci.c

Re: [PATCH v2 2/2] hw/ide: add ich6 ide controller device emulation

2022-02-18 Thread Liav Albani
On 2/19/22 02:50, BALATON Zoltan wrote: +/* + * QEMU IDE Emulation: PCI ICH6/ICH7 IDE support. This is a small thing, but if these two are the same maybe keeping this comment but using the ich7 name everywhere else would make it less likely to get it confused with ich9. I mean ich6 and ich9

Re: [PATCH v2 1/2] hw/ide: split bmdma read and write functions from piix.c

2022-02-18 Thread Liav Albani
On 2/19/22 02:12, BALATON Zoltan wrote: On Fri, 18 Feb 2022, Liav Albani wrote: This is a preparation before implementing another PCI IDE controller that relies on these functions, so these can be shared between both implementations. Signed-off-by: Liav Albani --- hw/ide/bmdma.c

[PATCH v2 2/2] hw/ide: add ich6 ide controller device emulation

2022-02-18 Thread Liav Albani
s resource management as the guest OS can relocate the IO ports as it sees fit to its needs. However, this is still a legacy device that belongs to chipsets from late 2000s. Signed-off-by: Liav Albani --- hw/i386/Kconfig | 2 + hw/ide/Kconfig | 5 + hw/ide/ich6.c

[PATCH v2 1/2] hw/ide: split bmdma read and write functions from piix.c

2022-02-18 Thread Liav Albani
This is a preparation before implementing another PCI IDE controller that relies on these functions, so these can be shared between both implementations. Signed-off-by: Liav Albani --- hw/ide/bmdma.c | 84 ++ hw/ide/meson.build | 2 +- hw/ide

[PATCH v2 0/2] hw/ide: implement ich6 ide controller support

2022-02-18 Thread Liav Albani
e controller in the system. Liav Albani (2): hw/ide: split bmdma read and write functions from piix.c hw/ide: add ich6 ide controller device emulation hw/i386/Kconfig | 2 + hw/ide/Kconfig | 5 + hw/ide/bmdma.c | 84 hw/ide/ich6.c

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-14 Thread Liav Albani
Feb 2022, BALATON Zoltan wrote: Hello, Ping? John, do you agree with my comments? Should Liav proceed to send a v2? Thanks, BALATON Zoltan On Sat, 5 Feb 2022, Liav Albani wrote: On 2/5/22 17:48, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Liav Albani wrote: This type of IDE controller has supp

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-05 Thread Liav Albani
On 2/5/22 17:48, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Liav Albani wrote: This type of IDE controller has support for relocating the IO ports and doesn't use IRQ 14 and 15 but one allocated PCI IRQ for the controller. I haven't looked at in detail so only a few comments I&#x

[PATCH] hw/ide: implement ich6 ide controller support

2022-02-05 Thread Liav Albani
This type of IDE controller has support for relocating the IO ports and doesn't use IRQ 14 and 15 but one allocated PCI IRQ for the controller. Signed-off-by: Liav Albani --- hw/i386/Kconfig | 2 + hw/ide/Kconfig | 5 + hw/ide/bmdma.c | 83 ++