[PULL 12/17] configure: do not create legacy symlinks

2024-02-20 Thread Paolo Bonzini
Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 10 -- 1 file changed, 10 deletions(-) diff --git a/configure b/configure index ff058d6c486..9cdb5a6818b 100755 --- a/configure +++ b/configure @@ -1605,21 +1605,11 @@ echo "GENISOIMAGE=$genisoimage" >&

[PULL 14/17] i386: xen: fix compilation --without-default-devices

2024-02-20 Thread Paolo Bonzini
The xenpv machine type requires XEN_BUS, so select it. Signed-off-by: Paolo Bonzini --- accel/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/Kconfig b/accel/Kconfig index a30cf2eb483..794e0d18d21 100644 --- a/accel/Kconfig +++ b/accel/Kconfig @@ -16,3 +16,4 @@ config KVM

[PULL 16/17] usb: inline device creation functions

2024-02-20 Thread Paolo Bonzini
. Acked-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/hw/usb.h | 27 --- hw/usb/bus.c | 23 --- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2a..cfeead28403 100644

[PULL 09/17] mips: remove unnecessary "select PTIMER"

2024-02-20 Thread Paolo Bonzini
There is no use of ptimer functions in mips_cps.c or any other related code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index 505381a0bba..ab61af209a0 100644 --- a/hw

[PULL 11/17] smc37c669: remove useless is_enabled functions

2024-02-20 Thread Paolo Bonzini
Calls to is_enabled are bounded to indices that actually exist in the SuperIO device. Therefore, the is_enabled functions in smc37c669 are not doing anything and they can be removed. Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini --- hw/isa/smc37c669-superio.c | 18

[PULL 02/17] i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs

2024-02-20 Thread Paolo Bonzini
d-by: Yang Weijiang Message-ID: <20240115091325.1904229-3-xiaoyao...@intel.com> Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 800caeb593b..3c

[PULL 03/17] target/i386: Add support of KVM_FEATURE_ASYNC_PF_VMEXIT for guest

2024-02-20 Thread Paolo Bonzini
From: Xiaoyao Li KVM_FEATURE_ASYNC_PF_VMEXIT has been introduced for years, however QEMU doesn't support expose it to guest. Add support for it. Signed-off-by: Xiaoyao Li Message-ID: <20231024083354.1171308-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2

[PULL 10/17] isa-superio: validate floppy.count value

2024-02-20 Thread Paolo Bonzini
Ensure that the value is valid; it can only be zero or one. And never create a floppy disk controller if it is zero. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/isa/isa-superio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/isa/isa

[PULL 08/17] i386/cpuid: Move leaf 7 to correct group

2024-02-20 Thread Paolo Bonzini
g EAX is 1 or not. Leaf 7 follows the logic that EAX of subleaf 0 enumerates the maximum valid subleaf. Fixes: b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM") Signed-off-by: Xiaoyao Li Message-ID: <20240125024016.2521244-4-xiaoyao...@intel.com> Cc: qemu-sta...@nongn

[PULL 04/17] i386/pc: Drop pc_machine_kvm_type()

2024-02-20 Thread Paolo Bonzini
d Hildenbrand Acked-by: David Woodhouse Acked-by: Michael S. Tsirkin Message-ID: <20231007065819.27498-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 5 - 2 files changed, 8 deletions(-) diff --git a/include/hw/i386/pc.h b/

[PULL 01/17] i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available

2024-02-20 Thread Paolo Bonzini
325.1904229-2-xiaoyao...@intel.com> Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0cd32a6fce3..800caeb593b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@

[PULL 06/17] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F

2024-02-20 Thread Paolo Bonzini
: <20240125024016.2521244-2-xiaoyao...@intel.com> Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 76a66246eb7..dff9dedbd76 100644 --- a/target/i386/kvm/kvm.c

[PULL 00/17] Build, x86 patches for 2024-02-16

2024-02-20 Thread Paolo Bonzini
and x86 Paolo Bonzini (8): mips: remove unnecessary "select PTIMER" isa-superio: validate floppy.count value smc37c669: remove useless is_enabled functions configure: do not create legacy symlinks

[PULL 05/17] physmem: replace function name with __func__ in ram_block_discard_range()

2024-02-20 Thread Paolo Bonzini
From: Xiaoyao Li Use __func__ to avoid hard-coded function name. Signed-off-by: Xiaoyao Li Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240125023328.2520888-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- system/physmem.

Re: [PATCH v3 1/9] usb: inline device creation functions

2024-02-17 Thread Paolo Bonzini
On Fri, Feb 16, 2024 at 12:14 PM Philippe Mathieu-Daudé wrote: > > On 13/2/24 16:49, Paolo Bonzini wrote: > > Allow boards to use the device creation functions even if USB itself > > is not available; of course the functions will fail inexorably, but > > this

Re: [PATCH v2] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-16 Thread Paolo Bonzini
On Fri, Feb 16, 2024 at 10:16 AM Thomas Huth wrote: > > When running "configure" with "--without-default-devices", building > of qemu-system-hppa currently fails with: > > /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function > `machine_HP_common_init_tail': >

Re: [PATCH v3 8/9] mips/loongson3_virt: do not require CONFIG_USB

2024-02-15 Thread Paolo Bonzini
On Thu, Feb 15, 2024 at 3:27 PM BALATON Zoltan wrote: > > On Thu, 15 Feb 2024, Philippe Mathieu-Daudé wrote: > > On 13/2/24 16:50, Paolo Bonzini wrote: > >> Once the Kconfig for hw/mips is cleaned up, it will be possible to build a > >> binary that does not i

Re: [PATCH 1/1] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix

2024-02-15 Thread Paolo Bonzini
On 2/15/24 10:50, Ziqiao Kong wrote: target/i386: As specified by Intel Manual Vol2 3-180, cmp instructions are not allowed to have lock prefix and a `UD` should be raised. Without this patch, s1->T0 will be uninitialized and used in the case OP_CMPL. Signed-off-by: Ziqiao Kong ---

Re: [PATCH v3 8/9] mips/loongson3_virt: do not require CONFIG_USB

2024-02-15 Thread Paolo Bonzini
On Thu, Feb 15, 2024 at 8:55 AM Philippe Mathieu-Daudé wrote: > > if (defaults_enabled() && object_class_by_name("pci-ohci")) { > > pci_create_simple(pci_bus, -1, "pci-ohci"); > > -usb_create_simple(usb_bus_find(-1), "usb-kbd"); > > -

[PATCH v3 8/9] mips/loongson3_virt: do not require CONFIG_USB

2024-02-13 Thread Paolo Bonzini
of usb_bus_find(). Remove it, replacing it with a search of the single USB bus created by loongson3_virt_devices_init(). Signed-off-by: Paolo Bonzini --- hw/mips/loongson3_virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips

[PATCH v3 9/9] mips: do not list individual devices from configs/

2024-02-13 Thread Paolo Bonzini
articular only those that are inlined. For this reason, usb_bus_find() must be removed, as it only exists if CONFIG_USB is selected by a host controller. Signed-off-by: Paolo Bonzini --- configs/devices/mips-softmmu/common.mak | 28 +++- configs/devices/mips64el-soft

[PATCH v3 7/9] mips: allow compiling out CONFIG_MIPS_ITU

2024-02-13 Thread Paolo Bonzini
itc_reconfigure() is referenced from TCG, compile out the helpers that reference env->itu if CONFIG_MIPS_ITU is not defined. This makes it possible to build a QEMU binary that only includes boards without a CPS device (only Malta and Boston create one). Signed-off-by: Paolo Bonzini --- tar

[PATCH v3 2/9] isa: clean up Kconfig selections for ISA_SUPERIO

2024-02-13 Thread Paolo Bonzini
All users of ISA_SUPERIO include a floppy disk controller, serial port and parallel port via the automatic creation mechanism of isa-superio.c. Select the symbol and remove it from the dependents. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- hw/isa/Kconfig | 13

[PATCH v3 4/9] isa: fix ISA_SUPERIO dependencies

2024-02-13 Thread Paolo Bonzini
Beschow Signed-off-by: Paolo Bonzini --- hw/isa/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 7884179d08b..5df3c09cd51 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -15,7 +15,7 @@ config I82378 config ISA_SUPERIO

[PATCH v3 3/9] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board

2024-02-13 Thread Paolo Bonzini
From: Bernhard Beschow The board doesn't have a working ISA bus, only some I/O space. Selecting ISA_BUS and including hw/isa/isa.h is not necessary. Signed-off-by: Bernhard Beschow Message-ID: <20230109204124.102592-3-shen...@gmail.com> Signed-off-by: Paolo Bonzini --- hw/mips/mipssim

[PATCH v3 6/9] isa: extract FDC37M81X to a separate file

2024-02-13 Thread Paolo Bonzini
isa-superio.c currently defines a SuperIO chip that is not used by any other user of the file. Extract the chip to a separate file. Reviewed-by: BALATON Zoltan Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini --- hw/isa/fdc37m81x-superio.c | 32 hw

[PATCH v3 5/9] isa: specify instance_size in isa_superio_type_info

2024-02-13 Thread Paolo Bonzini
as isa_superio_realize is called. Fix this by specifying the instance_size already in the superclass. Fixes: 4c3119a6e3 ("hw/isa/superio: Factor out the parallel code from pc87312.c") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini --- hw/isa/isa

[PATCH v3 1/9] usb: inline device creation functions

2024-02-13 Thread Paolo Bonzini
. Acked-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/hw/usb.h | 27 --- hw/usb/bus.c | 23 --- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2a..cfeead28403 100644

[PATCH v3 0/9] mips: do not list individual devices from configs/

2024-02-13 Thread Paolo Bonzini
MIPS_ITU" - extract patch 8 ("mips/loongson3_virt: do not require CONFIG_USB") Bernhard Beschow (1): hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board Paolo Bonzini (8): usb: inline device creation functions isa: clean up Kconfig selections for ISA_SUPERIO isa: fix I

[PATCH] ci: Fix again build-previous-qemu

2024-02-13 Thread Paolo Bonzini
/qemu.git/ >From https://gitlab.com/qemu-project/qemu * tag v8.2.0 -> FETCH_HEAD $ git checkout $QEMU_PREV_VERSION 00:02 error: pathspec v8.2.0 did not match any file(s) known to git Fix by fetching the tag into the checkout itself. Signed-off-by: Paolo B

[PATCH] i386: xen: fix compilation --without-default-devices

2024-02-09 Thread Paolo Bonzini
The xenpv machine type requires XEN_BUS, so select it. Signed-off-by: Paolo Bonzini --- accel/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/Kconfig b/accel/Kconfig index a30cf2eb483..794e0d18d21 100644 --- a/accel/Kconfig +++ b/accel/Kconfig @@ -16,3 +16,4 @@ config KVM

Re: [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0

2024-02-08 Thread Paolo Bonzini
On Thu, Feb 8, 2024 at 10:46 AM Mark Cave-Ayland wrote: > > On 01/02/2024 11:36, Paolo Bonzini wrote: > > > Il gio 1 feb 2024, 12:25 Mark Cave-Ayland > <mailto:mark.cave-ayl...@ilande.co.uk>> ha scritto: > > > > On 01/02/2024 10:46, Paolo Bonzini wro

Re: [PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU

2024-02-08 Thread Paolo Bonzini
On Wed, Feb 7, 2024 at 8:12 PM Philippe Mathieu-Daudé wrote: > > Hi Paolo, > > On 7/2/24 12:14, Paolo Bonzini wrote: > > itc_reconfigure() is referenced from TCG, provide a stub if needed. > > This makes it possible to build a QEMU binary that only includes > > boa

Re: [PATCH v2 3/8] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board

2024-02-08 Thread Paolo Bonzini
On Wed, Feb 7, 2024 at 7:58 PM Philippe Mathieu-Daudé wrote: > > @@ -6,8 +6,7 @@ config MALTA > > > > config MIPSSIM > > bool > > -select ISA_BUS > > -select SERIAL_ISA > > +select SERIAL > > Hmm there is an ISA bus which can be exposed with: > > -- >8 -- > diff --git

Re: [PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU

2024-02-07 Thread Paolo Bonzini
Il mer 7 feb 2024, 14:16 BALATON Zoltan ha scritto: > On Wed, 7 Feb 2024, Paolo Bonzini wrote: > > itc_reconfigure() is referenced from TCG, provide a stub if needed. > > This makes it possible to build a QEMU binary that only includes > > boards without a CPS device (

Re: [PATCH v2 8/8] mips: do not list individual devices from configs/

2024-02-07 Thread Paolo Bonzini
Il mer 7 feb 2024, 14:18 BALATON Zoltan ha scritto: > > if (defaults_enabled() && object_class_by_name("pci-ohci")) { > > pci_create_simple(pci_bus, -1, "pci-ohci"); > > -usb_create_simple(usb_bus_find(-1), "usb-kbd"); > > -usb_create_simple(usb_bus_find(-1),

[PATCH v2 6/8] isa: extract FDC37M81X to a separate file

2024-02-07 Thread Paolo Bonzini
isa-superio.c currently defines a SuperIO chip that is not used by any other user of the faile. Extract the chip to a separate file. Signed-off-by: Paolo Bonzini --- hw/isa/fdc37m81x-superio.c | 32 hw/isa/isa-superio.c | 18 -- hw/isa

[PATCH v2 4/8] isa: fix ISA_SUPERIO dependencies

2024-02-07 Thread Paolo Bonzini
ISA_SUPERIO does not provide an ISA bus, so it should not select the symbol: instead it requires one. Among its users, VT82C686 is the only one that is a PCI-ISA bridge and does not already select ISA_BUS. Signed-off-by: Paolo Bonzini --- hw/isa/Kconfig | 3 ++- 1 file changed, 2 insertions

[PATCH v2 3/8] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board

2024-02-07 Thread Paolo Bonzini
From: Bernhard Beschow The board doesn't seem to have an ISA bus at all. Signed-off-by: Bernhard Beschow Message-ID: <20230109204124.102592-3-shen...@gmail.com> Signed-off-by: Paolo Bonzini --- hw/mips/mipssim.c | 1 - hw/mips/Kconfig | 3 +-- 2 files changed, 1 insertion(+), 3 del

[PATCH v2 2/8] isa: clean up Kconfig selections for ISA_SUPERIO

2024-02-07 Thread Paolo Bonzini
All users of ISA_SUPERIO include a floppy disk controller, serial port and parallel port via the automatic creation mechanism of isa-superio.c. Select the symbol and remove it from the dependents. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- hw/isa/Kconfig | 13

[PATCH v2 0/8] mips: do not list individual devices from configs/

2024-02-07 Thread Paolo Bonzini
A dependencies from MIPSsim board Paolo Bonzini (8): usb: inline device creation functions isa: clean up Kconfig selections for ISA_SUPERIO isa: fix ISA_SUPERIO dependencies isa: specify instance_size in isa_superio_type_info isa: extract FDC37M81X to a separate file mips:

[PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU

2024-02-07 Thread Paolo Bonzini
itc_reconfigure() is referenced from TCG, provide a stub if needed. This makes it possible to build a QEMU binary that only includes boards without a CPS device (only Malta and Boston create one). Signed-off-by: Paolo Bonzini --- hw/mips/mips_itu-stub.c | 26 ++ hw/mips

[PATCH v2 8/8] mips: do not list individual devices from configs/

2024-02-07 Thread Paolo Bonzini
Add new "select" and "imply" directives if needed. The resulting config-devices.mak files are the same as before. Signed-off-by: Paolo Bonzini --- configs/devices/mips-softmmu/common.mak | 28 +++- configs/devices/mips64el-softmmu/default.m

[PATCH v2 5/8] isa: specify instance_size in isa_superio_type_info

2024-02-07 Thread Paolo Bonzini
as isa_superio_realize is called. Fix this by specifying the instance_size already in the superclass. Cc: Bernhard Beschow Signed-off-by: Paolo Bonzini --- hw/isa/isa-superio.c | 2 +- hw/isa/smc37c669-superio.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/isa/isa-superio.c b/hw

[PATCH v2 1/8] usb: inline device creation functions

2024-02-07 Thread Paolo Bonzini
. Acked-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/hw/usb.h | 27 --- hw/usb/bus.c | 23 --- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2a..cfeead28403 100644

Re: [PATCH 2/4] isa: extract FDC37M81X to a separate file

2024-02-06 Thread Paolo Bonzini
On Sun, Feb 4, 2024 at 9:00 PM Bernhard Beschow wrote: > >-/* SMS FDC37M817 Super I/O */ > >-static void fdc37m81x_class_init(ObjectClass *klass, void *data) > >-{ > >-ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass); > >- > >-sc->serial.count = 2; /* NS16C550A */ > >-sc->parallel.count

Re: [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0

2024-02-01 Thread Paolo Bonzini
Il gio 1 feb 2024, 12:25 Mark Cave-Ayland ha scritto: > On 01/02/2024 10:46, Paolo Bonzini wrote: > > > On Fri, Jan 12, 2024 at 1:55 PM Mark Cave-Ayland > > wrote: > >> > >> Invert the logic so that the end of DMA transfer check becomes one that > checks &

Re: [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0

2024-02-01 Thread Paolo Bonzini
On Fri, Jan 12, 2024 at 1:55 PM Mark Cave-Ayland wrote: > > Invert the logic so that the end of DMA transfer check becomes one that checks > for TC == 0 in the from device path in do_dma_pdma_cb(). > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 24 +++- > 1 file

Re: [PATCH] mips: allow compiling out CONFIG_MIPS_ITU

2024-01-31 Thread Paolo Bonzini
Il lun 29 gen 2024, 14:31 Paolo Bonzini ha scritto: > On Mon, Jan 29, 2024 at 2:30 PM Philippe Mathieu-Daudé > wrote: > > > > Hi Paolo, > > > > On 29/1/24 13:13, Paolo Bonzini wrote: > > > itu_reconfigure() is referenced from TCG, provide a st

Re: [PATCH 2/4] isa: extract FDC37M81X to a separate file

2024-01-29 Thread Paolo Bonzini
On Mon, Jan 29, 2024 at 8:49 PM Bernhard Beschow wrote: > Don't we prefer a macro for below code? While touching the code we could use > it. (Sorry I can't recall its name from the top of my head and I don't have > access to the code right now). Ah yeah, OBJECT_DEFINE_TYPE. Not sure it's much

Re: [PATCH v3 2/3] tools: build qemu-vmsr-helper

2024-01-29 Thread Paolo Bonzini
On Mon, Jan 29, 2024 at 8:54 PM Daniel P. Berrangé wrote: > Looking again, the TID is never used after being checked. QEMU sends > the TID, but the helper never does anything with this information > except to check the TID belongs the PID. Why are we sending the TID ? Doh! sched_getaffinity's

Re: [PATCH v3 2/3] tools: build qemu-vmsr-helper

2024-01-29 Thread Paolo Bonzini
On Mon, Jan 29, 2024 at 7:53 PM Daniel P. Berrangé wrote: > > diff --git a/meson.build b/meson.build > > index d0329966f1b4..93fc233b0891 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -4015,6 +4015,11 @@ if have_tools > > dependencies: [authz, crypto, io, qom,

Re: [PATCH v3 1/3] qio: add support for SO_PEERCRED for socket channel

2024-01-29 Thread Paolo Bonzini
On Thu, Jan 25, 2024 at 5:38 PM Daniel P. Berrangé wrote: > > +static void > > +qio_channel_socket_get_peerpid(QIOChannel *ioc, > > + unsigned int *pid, > > + Error **errp) > > +{ > > +#ifdef CONFIG_LINUX > > +QIOChannelSocket *sioc

Re: [PATCH 0/4] mips: do not list individual devices from configs/

2024-01-29 Thread Paolo Bonzini
On Mon, Jan 29, 2024 at 6:48 PM Bernhard Beschow wrote: > Am 29. Januar 2024 13:37:44 UTC schrieb Paolo Bonzini : > >Back when Kconfig was introduced, the individual dependencies for MIPS > >boards were never added to hw/mips/Kconfig. Do it now. > > There is also: >

[PATCH] configure: put all symlink creation together

2024-01-29 Thread Paolo Bonzini
Based-on: <20240129133651.1106552-1-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 9cdb5a6818b..3cd736b139f 100755 --- a/configure +++ b/configure @@ -1538,6 +1

Re: [PATCH] configure: do not create legacy symlinks

2024-01-29 Thread Paolo Bonzini
On Mon, Jan 29, 2024 at 2:46 PM Thomas Huth wrote: > > On 29/01/2024 14.36, Paolo Bonzini wrote: > > With more than three years since Meson was introduced in the build system, > > people > > have had quite some time to move away from the foo-softmmu/qemu-system-* and

[PATCH 0/4] mips: do not list individual devices from configs/

2024-01-29 Thread Paolo Bonzini
without default devices. Tested by comparing old and new kconfigs; and also by building each of the boards one by one, with default devices disabled, and checking that the board can be started. Paolo Paolo Bonzini (4): isa: clean up Kconfig selections for ISA_SUPERIO isa: extract FDC37M81X

[PATCH 2/4] isa: extract FDC37M81X to a separate file

2024-01-29 Thread Paolo Bonzini
isa-superio.c currently defines a SuperIO chip that depends on CONFIG_IDE_ISA, but not all users of isa-superio.c depend on that symbol. Extract the chip to a separate file so that there is an obvious place to select IDE_ISA. Signed-off-by: Paolo Bonzini --- hw/isa/fdc37m81x-superio.c | 37

[PATCH 1/4] isa: clean up Kconfig selections for ISA_SUPERIO

2024-01-29 Thread Paolo Bonzini
All users of ISA_SUPERIO include a floppy disk controller, serial port and parallel port via the automatic creation mechanism of isa-superio.c. Select the symbol and remove it from the dependents. Signed-off-by: Paolo Bonzini --- hw/isa/Kconfig | 13 - 1 file changed, 4 insertions

[PATCH 3/4] usb: inline device creation functions

2024-01-29 Thread Paolo Bonzini
. Signed-off-by: Paolo Bonzini --- include/hw/usb.h | 26 +++--- hw/usb/bus.c | 23 --- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2a..bd76c514d17 100644 --- a/include/hw/usb.h +++ b

[PATCH 4/4] mips: do not list individual devices from configs/

2024-01-29 Thread Paolo Bonzini
Add new "select" and "imply" directives if needed. The resulting config-devices.mak files are the same as before. Signed-off-by: Paolo Bonzini --- configs/devices/mips-softmmu/common.mak | 28 +++- configs/devices/mips64el-softmmu/default.m

[PATCH] configure: do not create legacy symlinks

2024-01-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 10 -- 1 file changed, 10 deletions(-) diff --git a/configure b/configure index ff058d6c486..9cdb5a6818b 100755 --- a/configure +++ b/configure @@ -1605,21 +1605,11 @@ echo "GENISOIMAGE=$genisoimage" >> $config_ho

[PATCH] smc37c669: remove useless is_enabled functions

2024-01-29 Thread Paolo Bonzini
Calls to is_enabled are bounded to indices that actually exist in the SuperIO device. Therefore, the is_enabled functions in smc37c669 are not doing anything and they can be removed. Signed-off-by: Paolo Bonzini --- hw/isa/smc37c669-superio.c | 18 -- 1 file changed, 18

[PATCH] isa-superio: validate floppy.count value

2024-01-29 Thread Paolo Bonzini
Ensure that the value is valid; it can only be zero or one. And never create a floppy disk controller if it is zero. Signed-off-by: Paolo Bonzini --- hw/isa/isa-superio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index

Re: [PATCH] mips: allow compiling out CONFIG_MIPS_ITU

2024-01-29 Thread Paolo Bonzini
On Mon, Jan 29, 2024 at 2:30 PM Philippe Mathieu-Daudé wrote: > > Hi Paolo, > > On 29/1/24 13:13, Paolo Bonzini wrote: > > itu_reconfigure() is referenced from TCG, provide a stub if needed. > > s/itu_reconfigure/itc_reconfigure/ > > What are you trying to achieve?

[PATCH] mips: allow compiling out CONFIG_MIPS_ITU

2024-01-29 Thread Paolo Bonzini
itu_reconfigure() is referenced from TCG, provide a stub if needed. Signed-off-by: Paolo Bonzini --- hw/mips/mips_itu-stub.c | 26 ++ hw/mips/meson.build | 1 + 2 files changed, 27 insertions(+) create mode 100644 hw/mips/mips_itu-stub.c diff --git a/hw/mips

[PATCH] kconfig: use "select" to enable semihosting

2024-01-29 Thread Paolo Bonzini
Just like all other dependencies, these can be expressed in Kconfig files rather than in the default configurations. Signed-off-by: Paolo Bonzini --- configs/devices/m68k-softmmu/default.mak| 2 -- configs/devices/mips-softmmu/common.mak | 3 --- configs/devices/nios2-softmmu

[PATCH] mips: remove unnecessary "select PTIMER"

2024-01-29 Thread Paolo Bonzini
There is no use of ptimer functions in mips_cps.c or any other related code. Signed-off-by: Paolo Bonzini --- hw/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index 505381a0bba..ab61af209a0 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig

Re: [PATCH v2 1/3] target/arm: Move v7m-related code from cpu32.c into a separate file

2024-01-29 Thread Paolo Bonzini
On 1/29/24 09:18, Thomas Huth wrote: Move the code to a separate file so that we do not have to compile it anymore if CONFIG_ARM_V7M is not set. Signed-off-by: Thomas Huth --- target/arm/tcg/cpu-v7m.c | 290 + target/arm/tcg/cpu32.c | 261

Re: [PATCH 0/2] accel/kvm: Sanitize KVM_HAVE_MCE_INJECTION definition

2024-01-26 Thread Paolo Bonzini
On Wed, Jan 24, 2024 at 4:54 PM Philippe Mathieu-Daudé wrote: > > Trivial replacement of KVM_HAVE_MCE_INJECTION by > KVM_ARCH_HAVE_MCE_INJECTION (not the "ARCH_" difference). I am confused, why can't you just rename the symbol and instead you go through this change? Paolo > Philippe

Re: [PATCH 1/2] scripts/coccinelle: Add cpu_env.cocci_template script

2024-01-26 Thread Paolo Bonzini
On Fri, Jan 26, 2024 at 11:38 AM Philippe Mathieu-Daudé wrote: > > On 25/1/24 17:56, Philippe Mathieu-Daudé wrote: > > Add a Coccinelle script to convert the following slow path > > (due to the QOM cast macro): > > > >_CPU(..)->env > > > > to the following fast path: > > > >cpu_env(..) >

Re: Do we still need pre-meson compatibility hacks?

2024-01-25 Thread Paolo Bonzini
On Thu, Jan 25, 2024 at 3:35 PM Daniel P. Berrangé wrote: > The latter feels redundant, but the former feels worthwhile as long as we > keep a wrapper cnofigure script around. > > It seems like we're not far off being able to do a build with the normal > sequence of > > meson setup build >

Re: Do we still need pre-meson compatibility hacks?

2024-01-25 Thread Paolo Bonzini
On Thu, Jan 25, 2024 at 2:02 PM Michael Tokarev wrote: > Heh. I still use `make qemu-system-arm` (or `ninja qemu-system-arm`), but > only > because I haven't followed closely what's the "right" target to use. I don't > care much which target it is exactly, but guess this is some info which

Re: [PATCH] physmem: replace function name with __func__ in ram_block_discard_range()

2024-01-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] i386/pc: Drop pc_machine_kvm_type()

2024-01-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] target/i386: Add support of KVM_FEATURE_ASYNC_PF_VMEXIT for guest

2024-01-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 0/2] i386/cpu: Two minor fixes for x86_cpu_enable_xsave_components()

2024-01-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Do we still need pre-meson compatibility hacks?

2024-01-24 Thread Paolo Bonzini
Right now configure contains a couple hacks to preserve some of the semantics of the pre-meson build system: 1) emulation of ./configure by creating a build directory and a forwarding GNUmakefile (requested by Kevin) 2) creation of symlinks such as x86_64-softmmu/qemu-system-x86_64 and

Re: [PATCH v2] cpu-exec: simplify jump cache management

2024-01-24 Thread Paolo Bonzini
On Tue, Jan 23, 2024 at 11:02 PM Alex Bennée wrote: > However I would note that TranslationBlock has the comment: > > * jmp_lock also protects the CF_INVALID cflag; a jump must not be chained > * to a destination TB that has CF_INVALID set. > > which I don't think holds true. It does,

[PATCH] configure: run plugin TCG tests again

2024-01-24 Thread Paolo Bonzini
meanwhile the shadowing is gone so it's clear that it goes in the tests/tcg configuration. Cc: alex.ben...@linaro.org Fixes: 39fb3cfc28b ("configure: clean up plugin option handling", 2023-10-18) Signed-off-by: Paolo Bonzini --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c

Re: [Stable-7.2.9 00/20] Patch Round-up for stable 7.2.9, freeze on 2024-01-27

2024-01-23 Thread Paolo Bonzini
arget/i386: Do not re-compute new pc with CF_PCREL 12 2926eab89699 guoguangyao: target/i386: fix incorrect EIP in PC-relative translation blocks 13 729ba8e933f8 Paolo Bonzini: target/i386: pcrel: store low bits of physical address in data[0] 14 3b14a555fdb6 Gerd Hoffmann: hw/pflash

[PATCH 8.1] accel/tcg: Revert mapping of PCREL translation block to multiple virtual addresses

2024-01-23 Thread Paolo Bonzini
This is causing regressions that have not been analyzed yet. Revert the change on stable branches. Cc: qemu-sta...@nongnu.org Cc: Michael Tokarev Related: https://gitlab.com/qemu-project/qemu/-/issues/2092 Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec.c | 4 ++-- accel/tcg/tb

[PATCH] accel/tcg: Revert mapping of PCREL translation block to multiple virtual addresses

2024-01-23 Thread Paolo Bonzini
This is causing regressions that have not been analyzed yet. Revert the change on stable branches. Related: https://gitlab.com/qemu-project/qemu/-/issues/2092 Signed-off-by: Paolo Bonzini --- include/exec/exec-all.h | 6 -- accel/tcg/cpu-exec.c | 4 ++-- accel/tcg/tb-maint.c

[PATCH 7.2] accel/tcg: Revert mapping of PCREL translation block to multiple virtual addresses

2024-01-23 Thread Paolo Bonzini
This is causing regressions that have not been analyzed yet. Revert the change on stable branches. Cc: qemu-sta...@nongnu.org Cc: Michael Tokarev Related: https://gitlab.com/qemu-project/qemu/-/issues/2092 Signed-off-by: Paolo Bonzini --- include/exec/exec-all.h | 6 -- accel/tcg/cpu

Re: [PATCH 1/5] target/i386: mask high bits of CR3 in 32-bit mode

2024-01-23 Thread Paolo Bonzini
On Thu, Jan 18, 2024 at 9:04 AM Michael Tokarev wrote: > > 22.12.2023 20:59, Paolo Bonzini: > > CR3 bits 63:32 are ignored in 32-bit mode (either legacy 2-level > > paging or PAE paging). Do this in mmu_translate() to remove > > the last where get_physical_address() mea

Re: [PATCH 2/5] util/uri: Simplify uri_string_unescape()

2024-01-23 Thread Paolo Bonzini
Il lun 22 gen 2024, 20:18 Thomas Huth ha scritto: > uri_string_unescape() basically does the same as the glib function > g_uri_unescape_string(), with just an additional length parameter. > You can replace it altogether with g_uri_unescape_segment. Paolo So we can simplify this function a lot

[PATCH v2] cpu-exec: simplify jump cache management

2024-01-22 Thread Paolo Bonzini
mu/-/issues/2092. It does not (and does not intend to) fix that issue; therefore it may make sense to not commit it until the root cause of issue #2092 is found. Signed-off-by: Paolo Bonzini --- accel/tcg/tb-jmp-cache.h | 8 +++-- accel/tcg/cpu-exec.c | 66 ++--

[PATCH] cpu-exec: simplify jump cache management

2024-01-22 Thread Paolo Bonzini
mu/-/issues/2092. It does not (and does not intend to) fix that issue; therefore it may make sense to not commit it until the root cause of issue #2092 is found. Signed-off-by: Paolo Bonzini --- accel/tcg/tb-jmp-cache.h | 8 +++--- accel/tcg/cpu-exec.c | 56 +++-

Re: [PATCH] monitor: add dumpdtb command only in device-tree-enabled targets

2024-01-22 Thread Paolo Bonzini
On Mon, Jan 22, 2024 at 2:40 PM Thomas Huth wrote: > > On 22/01/2024 10.24, Paolo Bonzini wrote: > > Remove the command altogether from targets that do not have device tree > > support, > > instead of leaving it nonfunctional. > > > > Signed-off-by: Paol

[PATCH] hw/xtensa: require libfdt

2024-01-22 Thread Paolo Bonzini
Always allow -dtb in qemu-system-xtensa. Basically all other targets require it if it can be used (including for example i386/x86_64). Signed-off-by: Paolo Bonzini --- configs/targets/xtensa-softmmu.mak | 1 + configs/targets/xtensaeb-softmmu.mak | 1 + hw/xtensa/xtfpga.c

[PATCH] monitor: add dumpdtb command only in device-tree-enabled targets

2024-01-22 Thread Paolo Bonzini
Remove the command altogether from targets that do not have device tree support, instead of leaving it nonfunctional. Signed-off-by: Paolo Bonzini --- meson.build| 2 -- qapi/machine.json | 2 +- hmp-commands.hx| 2 +- system/meson.build | 2 +- 4 files changed, 3 insertions(+), 5

[PULL 09/16] Add class property to configure KVM device node to use

2024-01-18 Thread Paolo Bonzini
is gated behind membership of the kvm group (as long as the process invoking qemu is able to open /dev/kvm and passes the file descriptor to qemu). Signed-off-by: Daan De Meyer Message-ID: <20231021134015.1119597-1-daan.j.deme...@gmail.com> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm

[PULL 10/16] io_uring: move LuringState typedef to block/aio.h

2024-01-18 Thread Paolo Bonzini
The LuringState typedef is defined twice, in include/block/raw-aio.h and block/io_uring.c. Move it in include/block/aio.h, which is included everywhere the typedef is needed, since include/block/aio.h already has to define the forward reference to the struct. Signed-off-by: Paolo Bonzini

[PULL 12/16] target/i386: fix incorrect EIP in PC-relative translation blocks

2024-01-18 Thread Paolo Bonzini
: guoguangyao Reviewed-by: Richard Henderson Message-ID: <20240115020804.30272-1-guoguangya...@mails.ucas.ac.cn> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tc

[PULL 13/16] target/i386: pcrel: store low bits of physical address in data[0]

2024-01-18 Thread Paolo Bonzini
759 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1964 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2012 Signed-off-by: Paolo Bonzini --- target/i386/tcg/tcg-cpu.c | 20 target/i386/tcg/translate.c | 1 - 2 files changed, 16 insertions(+), 5 delet

[PULL 04/16] vga: implement horizontal pel panning in graphics modes

2024-01-18 Thread Paolo Bonzini
it breaks the 256-color Keen games... Signed-off-by: Paolo Bonzini --- hw/display/vga-helpers.h | 100 --- hw/display/vga_int.h | 3 ++ hw/display/cirrus_vga.c | 4 ++ hw/display/vga.c | 36 -- 4 files changed, 111 insertions(+), 32

[PULL 08/16] vga: sort-of implement word and double-word access modes

2024-01-18 Thread Paolo Bonzini
ndependent, chain4 does not assert anymore that the address is in range. Instead it just returns all ones and discards writes, like other modes. Signed-off-by: Paolo Bonzini --- hw/display/vga_regs.h | 4 ++ hw/display/vga.c | 89 +++ 2 files c

[PULL 07/16] vga: use latches in odd/even mode too

2024-01-18 Thread Paolo Bonzini
; planar mode is how the plane is computed in read mode 0, and how the planes are masked if the aforementioned bit 2 is reset. It is almost enough to fix the game. You also need to honor byte/word mode selection, which is done in the next patch. Signed-off-by: Paolo Bonzini --- h

[PULL 14/16] remove unnecessary casts from uintptr_t

2024-01-18 Thread Paolo Bonzini
uintptr_t, or unsigned long which is equivalent on Linux I32LP64 systems, is an unsigned type and there is no need to further cast to __u64 which is another unsigned integer type; widening casts from unsigned integers zero-extend the value. Signed-off-by: Paolo Bonzini --- block/io_uring.c

[PULL 11/16] target/i386: Do not re-compute new pc with CF_PCREL

2024-01-18 Thread Paolo Bonzini
0617.129349-1-richard.hender...@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index e1eb82a5c68..d4d7e904adb 100644 --- a/target/i386/tcg/t

<    2   3   4   5   6   7   8   9   10   11   >