[PATCH v3 1/4] qom: allow to mark objects as deprecated or not secure.

2024-06-06 Thread Gerd Hoffmann
Add flags to ObjectClass for objects which are deprecated or not secure. Add 'deprecated' and 'not-secure' bools to ObjectTypeInfo, report in 'qom-list-types'. Print the flags when listing devices via '-device help'. Signed-off-by: Gerd Hoffmann --- include/qom/object.h | 3 +++ qom/qom-qmp

[PATCH v3 4/4] qdev: add device policy [RfC]

2024-06-06 Thread Gerd Hoffmann
, especially the 'deny' part of it. TODO: add a command line option to actually set these policies. Comments are welcome. Signed-off-by: Gerd Hoffmann --- hw/core/qdev.c | 60 +- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/hw

[PATCH v3 0/4] allow to deprecate objects and devices

2024-06-06 Thread Gerd Hoffmann
. v2: - pick up reviews. - drop ohci patch. - add cirrus vga patch. Gerd Hoffmann (4): qom: allow to mark objects as deprecated or not secure. usb/hub: mark as deprecated vga/cirrus: mark as not secure qdev: add device policy [RfC] include/qom/object.h| 3 ++ hw/core/qdev.c

[PATCH v3 3/4] vga/cirrus: mark as not secure

2024-06-06 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 1 + hw/display/cirrus_vga_isa.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 150883a97166..1f4c55b21415 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display

[PATCH v3 2/4] usb/hub: mark as deprecated

2024-06-06 Thread Gerd Hoffmann
The hub supports only USB 1.1. When running out of usb ports it is in almost all cases the much better choice to add another usb host adapter (or increase the number of root ports when using xhci) instead of using the usb hub. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 1 + 1 file

[PATCH v3 1/3] stdvga: fix screen blanking

2024-06-05 Thread Gerd Hoffmann
/qemu-project/qemu/-/issues/2067 Signed-off-by: Gerd Hoffmann --- hw/display/vga.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/display/vga.c b/hw/display/vga.c index 30facc6c8e33..474b6b14c327 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1762,6 +1762,12 @@ static void

[PATCH v3 2/3] ui+display: rename is_placeholder() -> surface_is_placeholder()

2024-06-05 Thread Gerd Hoffmann
No functional change. Signed-off-by: Gerd Hoffmann --- include/ui/surface.h | 2 +- ui/console.c | 2 +- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ui/surface.h b/include/ui/surface.h index

[PATCH v3 0/3] stdvga: fix screen blanking

2024-06-05 Thread Gerd Hoffmann
Gerd Hoffmann (3): stdvga: fix screen blanking ui+display: rename is_placeholder() -> surface_is_placeholder() ui+display: rename is_buffer_shared() -> surface_is_allocated() include/ui/surface.h| 6 +++--- hw/display/qxl-render.c | 2 +- hw/display/vga.c

[PATCH v3 3/3] ui+display: rename is_buffer_shared() -> surface_is_allocated()

2024-06-05 Thread Gerd Hoffmann
Boolean return value is reversed, to align with QEMU_ALLOCATED_FLAG, so all callers must be adapted. Also rename share_surface variable in vga_draw_graphic() to reduce confusion. No functional change. Suggested-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- include/ui/surface.h

Re: [PATCH v2 1/3] stdvga: fix screen blanking

2024-06-05 Thread Gerd Hoffmann
On Tue, Jun 04, 2024 at 10:27:18AM GMT, Marc-André Lureau wrote: > Hi > > > +if (is_buffer_shared(surface)) { > > Perhaps the suggestion to rename the function (in the following patch) > should instead be surface_is_allocated() ? that would match the actual > flag check. But callers would

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-06-05 Thread Gerd Hoffmann
Hi, > > Upstream QEMU's scope is to emulate pretty much arbitrary hardware that > > may have existed at any point in time. Emulating Cirrus is very much > > in scope upstream, and even if there are other better VGA devices, that > > doesn't make emulation of Cirrus redundant. > > > >

[PATCH v2 3/3] ui+display: rename is_placeholder -> surface_is_placeholder

2024-06-03 Thread Gerd Hoffmann
No functional change. Signed-off-by: Gerd Hoffmann --- include/ui/surface.h | 2 +- ui/console.c | 2 +- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ui/surface.h b/include/ui/surface.h index

[PATCH v2 0/3] stdvga: fix screen blanking

2024-06-03 Thread Gerd Hoffmann
Gerd Hoffmann (3): stdvga: fix screen blanking ui+display: rename is_buffer_shared() -> surface_is_borrowed() ui+display: rename is_placeholder -> surface_is_placeholder include/ui/surface.h| 4 ++-- hw/display/qxl-render.c | 2 +- hw/display/vga.c| 14 ++--

[PATCH v2 1/3] stdvga: fix screen blanking

2024-06-03 Thread Gerd Hoffmann
/qemu-project/qemu/-/issues/2067 Signed-off-by: Gerd Hoffmann --- hw/display/vga.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/display/vga.c b/hw/display/vga.c index 30facc6c8e33..474b6b14c327 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1762,6 +1762,12 @@ static void

[PATCH v2 2/3] ui+display: rename is_buffer_shared() -> surface_is_borrowed()

2024-06-03 Thread Gerd Hoffmann
No functional change. Suggested-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- include/ui/surface.h| 2 +- hw/display/qxl-render.c | 2 +- hw/display/vga.c| 10 +- hw/display/xenfb.c | 4 ++-- ui/console.c| 2 +- 5 files changed, 10 insertions

Re: [PATCH] stdvga: fix screen blanking

2024-06-03 Thread Gerd Hoffmann
On Mon, Jun 03, 2024 at 02:24:52PM GMT, Marc-André Lureau wrote: > Hi > > On Thu, May 30, 2024 at 3:05 PM Gerd Hoffmann wrote: > > > In case the display surface uses a shared buffer (i.e. uses vga vram > > directly instead of a shadow) go unshare th

Re: [PATCH 4/5] x86/loader: expose unpatched kernel

2024-06-03 Thread Gerd Hoffmann
On Sun, Jun 02, 2024 at 09:26:09AM GMT, Michael S. Tsirkin wrote: > On Thu, Apr 11, 2024 at 11:48:28AM +0200, Gerd Hoffmann wrote: > > Add a new "etc/boot/kernel" fw_cfg file, containing the kernel without > > the setup header patches. Intended use is booting in UEFI wit

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-05-30 Thread Gerd Hoffmann
Hi, > > > static const TypeInfo cirrus_vga_info = { > > > diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c > > > index 84be51670ed8..3abbf490 100644 > > > --- a/hw/display/cirrus_vga_isa.c > > > +++ b/hw/display/cirrus_vga_isa.c > > > @@ -85,6 +85,7 @@ static void

[PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-05-30 Thread Gerd Hoffmann
stdvga is the much better option. Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 1 + hw/display/cirrus_vga_isa.c | 1 + hw/display/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index

[PATCH v2 1/4] qom: allow to mark objects (including devices) as deprecated.

2024-05-30 Thread Gerd Hoffmann
Add deprecation_note field (string) to ObjectClass. Add deprecated bool to ObjectTypeInfo, report in 'qom-list-types'. Print the note when listing devices via '-device help'. Signed-off-by: Gerd Hoffmann --- include/qom/object.h | 1 + qom/qom-qmp-cmds.c| 4 system/qdev-monitor.c | 5

[PATCH v2 3/4] usb/hub: deprecate, don't build by default

2024-05-30 Thread Gerd Hoffmann
The hub supports only USB 1.1. When running out of usb ports it is in almost all cases the much better choice to add another usb host adapter (or increase the number of root ports when using xhci) instead of using the usb hub. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 1 + hw/usb

[PATCH v2 0/4] allow to deprecate objects and devices

2024-05-30 Thread Gerd Hoffmann
Put some infrastructure in place to allow tagging objects (including devices) as deprected. Use it to mark the ohci pci host adapter and the usb hub as deprecated. v2: - pick up reviews. - drop ohci patch. - add cirrus vga patch. Gerd Hoffmann (4): qom: allow to mark objects (including

[PATCH v2 2/4] usb: add config options for the hub and hid devices

2024-05-30 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Thomas Huth --- hw/usb/Kconfig | 10 ++ hw/usb/meson.build | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index f569ed7eeaa1..84bc7fbe36cd 100644 --- a/hw/usb/Kconfig +++ b/hw/usb

[PATCH v2] vnc: increase max display size

2024-05-30 Thread Gerd Hoffmann
It's 2024. 4k display resolutions are a thing these days. Raise width and height limits of the qemu vnc server. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1596 Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui

[PATCH] stdvga: fix screen blanking

2024-05-30 Thread Gerd Hoffmann
/qemu-project/qemu/-/issues/2067 Signed-off-by: Gerd Hoffmann --- hw/display/vga.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/display/vga.c b/hw/display/vga.c index 30facc6c8e33..34ab8eb9b745 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1762,6 +1762,12 @@ static void

Re: [PATCH v2 1/4] MAINTAINERS: drop audio maintainership

2024-05-28 Thread Gerd Hoffmann
Hi, > > virtio-snd > > -M: Gerd Hoffmann > > -R: Manos Pitsidianakis > > +M: Manos Pitsidianakis > > +R: Matias Ezequiel Vara Larsen > > S: Supported > > F: hw/audio/virtio-snd.c > > F: hw/audio/virtio-snd-pci.c > > While extra r

[PATCH 4/4] usb/hub: deprecate, don't build by default

2024-05-28 Thread Gerd Hoffmann
The hub supports only USB 1.1. When running out of usb ports it is in almost all cases the much better choice to add another usb host adapter (or increase the number of root ports when using xhci) instead of using the usb hub. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 1 + hw/usb

[PATCH 0/4] allow to deprecate objects and devices

2024-05-28 Thread Gerd Hoffmann
Put some infrastructure in place to allow tagging objects (including devices) as deprected. Use it to mark the ohci pci host adapter and the usb hub as deprecated. Gerd Hoffmann (4): qom: allow to mark objects (including devices) as deprecated. usb: add config options for the hub and hid

[PATCH 1/4] qom: allow to mark objects (including devices) as deprecated.

2024-05-28 Thread Gerd Hoffmann
Add deprecation_note field (string) to ObjectClass. Add deprecated bool to ObjectTypeInfo, report in 'qom-list-types'. Print the note when listing devices via '-device help'. Signed-off-by: Gerd Hoffmann --- include/qom/object.h | 1 + qom/qom-qmp-cmds.c| 4 system/qdev-monitor.c | 5

[PATCH 3/4] usb/ohci-pci: deprecate, don't build by default

2024-05-28 Thread Gerd Hoffmann
The xhci host adapter is the much better choice. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ohci-pci.c | 1 + hw/usb/Kconfig| 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index 33ed9b6f5a52..88de657def71 100644 --- a/hw

[PATCH 2/4] usb: add config options for the hub and hid devices

2024-05-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/Kconfig | 10 ++ hw/usb/meson.build | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index f569ed7eeaa1..84bc7fbe36cd 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -65,6 +65,16

[PATCH v2 1/4] MAINTAINERS: drop audio maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from audio (both devices and backend) entries. Flip status to "Orphan" for entries which have nobody else listed. Cc: Manos Pitsidianakis Cc: Matias Ezequiel Vara Larsen Cc: Thomas Huth Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 30 ++--

[PATCH v2 2/4] MAINTAINERS: drop usb maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from usb entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 58

[PATCH v2 4/4] MAINTAINERS: drop spice+ui maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from spice and ui entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAI

[PATCH v2 3/4] MAINTAINERS: drop virtio-gpu maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from virtio-gpu entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAI

[PATCH v2 0/4] MAINTAINERS: update kraxel's entries.

2024-05-28 Thread Gerd Hoffmann
see much development activity such as stdvga and cirrus for now. I might revisit this later. v2 changes: - flip entries without maintainer to orphan even if there is a reviewer left. - add/upgrade volunteers from replies to audio sections. take care, Gerd Gerd Hoffmann (4): MAINTAINERS

[PATCH v5] hw/pflash: fix block write start

2024-05-16 Thread Gerd Hoffmann
: https://gitlab.com/qemu-project/qemu/-/issues/2343 Fixes: 284a7ee2e290 ("hw/pflash: implement update buffer for block writes") Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH 4/4] MAINTAINERS: drop spice+ui maintainership

2024-05-16 Thread Gerd Hoffmann
Remove myself from spice and ui entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 4d9f4fd09823..d5b6a1c76

[PATCH 3/4] MAINTAINERS: drop virtio-gpu maintainership

2024-05-16 Thread Gerd Hoffmann
Remove myself from virtio-gpu entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d81376f84746..4d9f4fd09

[PATCH 2/4] MAINTAINERS: drop usb maintainership

2024-05-16 Thread Gerd Hoffmann
Remove myself from usb entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7f52e2912fc3..d81376f84

[PATCH 1/4] MAINTAINERS: drop audio maintainership

2024-05-16 Thread Gerd Hoffmann
Remove myself from audio (both devices and backend) entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/MAINTAINERS b/MAINTAI

[PATCH 0/4] MAINTAINERS: update kraxel's entries.

2024-05-16 Thread Gerd Hoffmann
see much development activity such as stdvga and cirrus for now. I might revisit this later. take care, Gerd Gerd Hoffmann (4): MAINTAINERS: drop audio maintainership MAINTAINERS: drop usb maintainership MAINTAINERS: drop virtio-gpu maintainership MAINTAINERS: drop spice+ui maintainership

[PATCH v4] hw/pflash: fix block write start

2024-05-16 Thread Gerd Hoffmann
: https://gitlab.com/qemu-project/qemu/-/issues/2343 Fixes: fcc79f2e0955 ("hw/pflash: implement update buffer for block writes") Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH v3] hw/pflash: fix block write start

2024-05-15 Thread Gerd Hoffmann
ot;hw/pflash: implement update buffer for block writes") Signed-off-by: Gerd Hoffmann --- hw/block/pflash_cfi01.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 1bda8424b907..c8f1cf5a8722 100644 ---

Re: [RFC PATCH 0/1] pci: allocate a PCI ID for RISC-V IOMMU

2024-05-07 Thread Gerd Hoffmann
On Tue, May 07, 2024 at 11:37:05PM GMT, Frank Chang wrote: > Hi Daniel, > > Daniel Henrique Barboza 於 2024年5月3日 週五 下午8:43寫道: > > > > Hi, > > > > In this RFC I want to check with Gerd and others if it's ok to add a PCI > > id for the RISC-V IOMMU device. It's currently under review in [1]. The >

Re: Problems (timeouts) when testing usb-ohci with qemu

2024-04-24 Thread Gerd Hoffmann
> qemu hack: > > hw/usb/hcd-ohci.c | 11 +++ > hw/usb/hcd-ohci.h | 1 + > 2 files changed, 12 insertions(+) > > diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c > index fc8fc91a1d..99e52ad13a 100644 > --- a/hw/usb/hcd-ohci.c > +++ b/hw/usb/hcd-ohci.c > @@ -267,6 +267,10 @@ static

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Gerd Hoffmann
Hi, > Gerd, any ideas? Maybe I needs something subtly different in my > edk2 build? I've not looked at this bit of the qemu infrastructure > before - is there a document on how that image is built? There is roms/Makefile for that. make -C roms help make -C roms efi So easiest would be to

Re: secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-15 Thread Gerd Hoffmann
Hi, > > Options I see: > > > > (a) Stop using direct kernel boot, let virt-install & other tools > > create vfat boot media with shim+kernel+initrd instead. > > > > (b) Enroll the distro signing keys in the efi variable store, so > > booting the kernel without shim.efi works.

Re: [PATCH 01/12] ui/console-vc: Replace sprintf() by g_strdup_printf()

2024-04-11 Thread Gerd Hoffmann
On Thu, Apr 11, 2024 at 11:36:10AM +0200, Philippe Mathieu-Daudé wrote: > On 11/4/24 09:47, Gerd Hoffmann wrote: > >Hi, > > > > > Due to security concerns inherent in the design of sprintf(3), > > > it is highly recommended that you use snprintf

[PATCH 5/5] x86/loader: add -shim option

2024-04-11 Thread Gerd Hoffmann
Add new -shim command line option, wire up for the x86 loader. When specified load shim into the new "etc/boot/shim" fw_cfg file. Needs OVMF changes too to be actually useful. Signed-off-by: Gerd Hoffmann --- include/hw/boards.h | 1 + hw/core/machine.c | 20 +++

[PATCH 2/5] x86/loader: only patch linux kernels

2024-04-11 Thread Gerd Hoffmann
happily loads and runs not only linux kernels but any efi binary via direct kernel boot. Note: Breaking the secure boot verification is a problem for linux kernels too, but fixed that is left for another day ... Signed-off-by: Gerd Hoffmann --- hw/i386/x86.c | 2 +- 1 file changed, 1 insertion

[PATCH 1/5] vl: fix qemu_validate_options() indention

2024-04-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- system/vl.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system/vl.c b/system/vl.c index c64422298245..0c6201c5bdc5 100644 --- a/system/vl.c +++ b/system/vl.c @@ -2411,15 +2411,15 @@ static void qemu_validate_options(const

[PATCH 4/5] x86/loader: expose unpatched kernel

2024-04-11 Thread Gerd Hoffmann
Add a new "etc/boot/kernel" fw_cfg file, containing the kernel without the setup header patches. Intended use is booting in UEFI with secure boot enabled, where the setup header patching breaks secure boot verification. Needs OVMF changes too to be actually useful. Signed-off-by: Ger

[PATCH 0/5] x86/loader: secure boot support for direct kernel load

2024-04-11 Thread Gerd Hoffmann
in place it is possible to use direct kernel load with secure boot enabled. take care, Gerd Gerd Hoffmann (5): vl: fix qemu_validate_options() indention x86/loader: only patch linux kernels x86/loader: read complete kernel x86/loader: expose unpatched kernel x86/loader: add -shim option

[PATCH 3/5] x86/loader: read complete kernel

2024-04-11 Thread Gerd Hoffmann
. Signed-off-by: Gerd Hoffmann --- hw/i386/x86.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 765899eebe43..6f75948b3021 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -1058,7 +1058,6 @@ void x86_load_linux(X86MachineState

Re: [PATCH 01/12] ui/console-vc: Replace sprintf() by g_strdup_printf()

2024-04-11 Thread Gerd Hoffmann
Hi, > Due to security concerns inherent in the design of sprintf(3), > it is highly recommended that you use snprintf(3) instead. > -char response[40]; > +g_autofree char *response = NULL; > -sprintf(response, "\033[%d;%dR", > +response

Re: secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Gerd Hoffmann
> > > Options I see: > > > > > > (a) Stop using direct kernel boot, let virt-install & other tools > > > create vfat boot media with shim+kernel+initrd instead. > > > > > > (b) Enroll the distro signing keys in the efi variable store, so > > > booting the kernel without shim.efi

Re: secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Gerd Hoffmann
On Wed, Apr 10, 2024 at 07:10:22AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 10, 2024 at 12:35:13PM +0200, Gerd Hoffmann wrote: > > On Wed, Apr 10, 2024 at 03:26:29AM -0400, Michael S. Tsirkin wrote: > > > On Wed, Apr 10, 2024 at 09:21:26AM +0200, Gerd Hoffmann wrote: >

secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Gerd Hoffmann
On Wed, Apr 10, 2024 at 03:26:29AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 10, 2024 at 09:21:26AM +0200, Gerd Hoffmann wrote: > > If the binary loaded via -kernel is *not* a linux kernel (in which > > case protocol == 0), do not patch the linux kernel header fields

[PATCH] x86/loader: only patch linux kernels

2024-04-10 Thread Gerd Hoffmann
happily loads and runs not only linux kernels but any efi binary via direct kernel boot. Note: Breaking the secure boot verification is a problem for linux kernels too, but fixed that is left for another day ... Signed-off-by: Gerd Hoffmann --- hw/i386/x86.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH] edk2: get version + date from git submodule

2024-04-09 Thread Gerd Hoffmann
On Tue, Apr 09, 2024 at 04:13:34PM +0100, Peter Maydell wrote: > On Tue, 9 Apr 2024 at 15:19, Peter Maydell wrote: > > > > On Tue, 9 Apr 2024 at 15:14, Gerd Hoffmann wrote: > > > > > > Hi, > > > > > > > > +

[PULL 1/4] edk2: get version + date from git submodule

2024-04-09 Thread Gerd Hoffmann
-by: Gerd Hoffmann Message-ID: <20240327102448.61877-2-kra...@redhat.com> --- roms/Makefile | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index edc234a0e886..783a5cab4f4c 100644 --- a/roms/Makefile +++ b/roms/Makefile @@

[PULL 0/4] Edk2 20240409 patches

2024-04-09 Thread Gerd Hoffmann
. Gerd Hoffmann (4): edk2: get version + date from git submodule edk2: commit version info edk2/seabios: use common extra version edk2: rebuild binaries with correct version information pc-bios/edk2-aarch64-code.fd.bz2 | Bin 1589310 -> 1588976 bytes pc-bios/edk2-arm-code.fd.

[PULL 2/4] edk2: commit version info

2024-04-09 Thread Gerd Hoffmann
Reviewed-by: Peter Maydell Signed-off-by: Gerd Hoffmann Message-ID: <20240327102448.61877-3-kra...@redhat.com> --- roms/edk2-version | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 roms/edk2-version diff --git a/roms/edk2-version b/roms/edk2-version new file mode 100644

[PULL 3/4] edk2/seabios: use common extra version

2024-04-09 Thread Gerd Hoffmann
Bring a bit more consistency into the naming. Reviewed-by: Peter Maydell Signed-off-by: Gerd Hoffmann Message-ID: <20240327102448.61877-4-kra...@redhat.com> --- roms/Makefile | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roms/Makefile b/roms/Makefile

Re: [PATCH] edk2: get version + date from git submodule

2024-04-09 Thread Gerd Hoffmann
Hi, > > + --version-override "$(EDK2_STABLE)-for-qemu" \ > > + --release-date "$(EDK2_DATE)" \ > > Hi -- I've just noticed that we never made this change to > automate the date/version for EDK2 ROMs, but we also never > updated the version by hand. So at the moment

Re: [PATCH-for-9.0 0/4] hw/virtio: Protect from more DMA re-entrancy bugs

2024-04-05 Thread Gerd Hoffmann
On Thu, Apr 04, 2024 at 09:13:35PM +0200, Philippe Mathieu-Daudé wrote: > Gerd suggested to use the transport guard to protect the > device from DMA re-entrancy abuses. Thanks for turning that idea into a proper patch series. Series: Reviewed-by: Gerd Hoffmann take care, Gerd

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-04-02 Thread Gerd Hoffmann
On Fri, Mar 29, 2024 at 10:19:09AM +, Bernhard Beschow wrote: > > In theory you could pass `-M acpi=off` to not instantiate the PIIX4 > ACPI function, essentially turning the Frankenstein-PIIX4 SB into a > PIIX3. However, this also removes SMI registers used by SeaBIOS to > handle SMM setup

[PATCH v2 2/3] edk2: commit version info

2024-03-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- roms/edk2-version | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 roms/edk2-version diff --git a/roms/edk2-version b/roms/edk2-version new file mode 100644 index ..1594ed8c4de9 --- /dev/null +++ b/roms/edk2-version @@ -0,0 +1,2

[PATCH v2 3/3] edk2/seabios: use common extra version

2024-03-27 Thread Gerd Hoffmann
Bring a bit more consistency into the naming. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index 783a5cab4f4c..dfed2b216a1e 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -41,8

[PATCH v2 1/3] edk2: get version + date from git submodule

2024-03-27 Thread Gerd Hoffmann
Turned out hard-coding version and date in the Makefile wasn't a bright idea. Updating it on edk2 updates is easily forgotten. Fetch the info from git instead. Store in edk2-version, so this can be committed to the repo and is present in tarballs too. Signed-off-by: Gerd Hoffmann --- roms

[PATCH v2 0/3] edk2: get version + date from git submodule

2024-03-27 Thread Gerd Hoffmann
v2 changes: - store version information in git Gerd Hoffmann (3): edk2: get version + date from git submodule edk2: commit version info edk2/seabios: use common extra version roms/Makefile | 25 ++--- roms/edk2-version | 2 ++ 2 files changed, 20 insertions(+), 7

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-27 Thread Gerd Hoffmann
On Tue, Mar 26, 2024 at 01:30:48PM +, Mark Cave-Ayland wrote: > Heh I've actually been using isapc over the past couple of weeks to fire up > some old programs in a Windows 3 VM :) I'm wondering why these use cases can't simply use the 'pc' machine type? The early pci chipsets of the 90-ies

Re: [PATCH] edk2: get version + date from git submodule

2024-03-26 Thread Gerd Hoffmann
On Mon, Mar 25, 2024 at 02:55:11PM +, Peter Maydell wrote: > On Mon, 25 Mar 2024 at 14:45, Gerd Hoffmann wrote: > > > > Turned out hard-coding version and date in the Makefile wasn't a bright > > idea. Updating it on edk2 updates is easily forgotten. Fetch the info

[PATCH v5 0/2] kvm: add support for guest physical bits

2024-03-25 Thread Gerd Hoffmann
The matching kernel bits are here: https://lore.kernel.org/kvm/20240313125844.912415-1-kra...@redhat.com/T/ ovmf test patches are here: https://github.com/kraxel/edk2/commits/devel/guest-phys-bits/ Gerd Hoffmann (2): kvm: add support for guest physical bits target/i386: add guest-phys-bits

[PATCH v5 2/2] target/i386: add guest-phys-bits cpu property

2024-03-25 Thread Gerd Hoffmann
Allows to set guest-phys-bits (cpuid leaf 8008, eax[23:16]) via -cpu $model,guest-phys-bits=$nr. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 3b7bd506baf1..79bea83b7b1c

[PATCH v5 1/2] kvm: add support for guest physical bits

2024-03-25 Thread Gerd Hoffmann
address bits. When set pass this to the guest, using cpuid too. Guest firmware can use this to figure how big the usable guest physical address space is, so PCI bar mapping are actually reachable. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.h | 1 + target/i386/cpu.c | 1

[PATCH] edk2: get version + date from git submodule

2024-03-25 Thread Gerd Hoffmann
Turned out hard-coding version and date in the Makefile wasn't a bright idea. Updating it on edk2 updates is easily forgotten. Fetch the info from git instead. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roms

Re: [PATCH v4 1/2] kvm: add support for guest physical bits

2024-03-22 Thread Gerd Hoffmann
> > +if (cpu->host_phys_bits_limit && > > +cpu->guest_phys_bits > cpu->host_phys_bits_limit) { > > +cpu->guest_phys_bits = cpu->host_phys_bits_limit; > > host_phys_bits_limit takes effect only when cpu->host_phys_bits is set. > > If users pass configuration like "-cpu >

[PULL 3/5] roms/efi: exclude efi shell from secure boot builds

2024-03-20 Thread Gerd Hoffmann
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4641 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann Message-ID: <20240314115307.628118-4-kra...@redhat.com> --- roms/edk2-build.config | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/edk2-build.config

[PULL 4/5] roms/efi: use pure 64-bit build for edk2-x86_64-secure-code.fd

2024-03-20 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Message-ID: <20240314115307.628118-5-kra...@redhat.com> --- roms/edk2-build.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index ef3eb7beebe7..cc9b21154205 100644 --- a/rom

[PULL 1/5] roms/efi: clean up edk2 build config

2024-03-20 Thread Gerd Hoffmann
Needed to avoid stale toolchain configurations breaking firmware builds. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann Message-ID: <20240314115307.628118-2-kra...@redhat.com> --- roms/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/Makefile b/roms/Ma

[PULL 2/5] roms/efi: drop workaround for edk2-stable202308

2024-03-20 Thread Gerd Hoffmann
Not needed for newer edk2 versions. Signed-off-by: Gerd Hoffmann Message-ID: <20240314115307.628118-3-kra...@redhat.com> --- roms/edk2-build.config | 6 -- 1 file changed, 6 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index 0d367dbdb775..05cbafef70cb

[PULL 0/5] Edk2 20240320 patches

2024-03-20 Thread Gerd Hoffmann
. Gerd Hoffmann (5): roms/efi: clean up edk2 build config roms/efi: drop workaround for edk2-stable202308 roms/efi: exclude efi shell from secure boot builds roms/efi: use pure 64-bit build for edk2-x86_64-secure-code.fd

[PATCH v4 2/2] target/i386: add guest-phys-bits cpu property

2024-03-18 Thread Gerd Hoffmann
Allows to set guest-phys-bits (cpuid leaf 8008, eax[23:16]) via -cpu $model,guest-phys-bits=$nr. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c88c895a5b3e..e0d73b6ec654

[PATCH v4 1/2] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
address bits. When set pass this to the guest, using cpuid too. Guest firmware can use this to figure how big the usable guest physical address space is, so PCI bar mapping are actually reachable. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.h | 1 + target/i386/cpu.c | 1

[PATCH v4 0/2] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
The matching kernel bits are here: https://lore.kernel.org/kvm/20240313125844.912415-1-kra...@redhat.com/T/ ovmf test patches are here: https://github.com/kraxel/edk2/commits/devel/guest-phys-bits/ Gerd Hoffmann (2): kvm: add support for guest physical bits target/i386: add guest-phys-bits

Re: [PATCH v3 2/3] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
Hi, > > diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c > > index 9c791b7b0520..a2b7bfaeadf8 100644 > > --- a/target/i386/kvm/kvm-cpu.c > > +++ b/target/i386/kvm/kvm-cpu.c > > @@ -18,10 +18,36 @@ > > #include "kvm_i386.h" > > #include "hw/core/accel-cpu.h" > > +static

Re: [PATCH v3 2/3] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
Hi, > > +if (cpu->guest_phys_bits > cpu->host_phys_bits_limit) { > > +cpu->guest_phys_bits = cpu->host_phys_bits_limit; > > host_phys_bits_limit is zero by default, so I think it is better to be > like: > > if (cpu->host_phys_bits_limit && >

Re: [PATCH 03/12] uefi-test-tools: Add support for python based build script

2024-03-15 Thread Gerd Hoffmann
> +Build/bios-tables-test.%.efi: > + $(PYTHON) ../../roms/edk2-build.py --config uefi-test-build.config Adding '--match $*' will build one arch instead of all.

Re: [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support

2024-03-15 Thread Gerd Hoffmann
d, 5 insertions(+), 1 deletion(-) Acked-by: Gerd Hoffmann

Re: [PATCH 01/12] roms/edk2-build.py: Add --module support

2024-03-15 Thread Gerd Hoffmann
On Fri, Mar 15, 2024 at 06:35:08PM +0530, Sunil V L wrote: > UefiTestToolsPkg which should use edk2-build.py needs --module parameter > support. Add this optional parameter handling. I don't think this is needed. By default everything listed in [Components] should be built, which is just that

[PATCH 2/5] roms/efi: drop workaround for edk2-stable202308

2024-03-14 Thread Gerd Hoffmann
Not needed for newer edk2 versions. Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 6 -- 1 file changed, 6 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index 0d367dbdb775..05cbafef70cb 100644 --- a/roms/edk2-build.config +++ b/roms/edk2-build.config

[PATCH 0/5] roms/efi: cleanup fix, config update, ekd2 binary rebuild

2024-03-14 Thread Gerd Hoffmann
Gerd Hoffmann (5): roms/efi: clean up edk2 build config roms/efi: drop workaround for edk2-stable202308 roms/efi: exclude efi shell from secure boot builds roms/efi: use pure 64-bit build for edk2-x86_64-secure-code.fd update edk2 binaries for arm, risc-v and x86 secure boot. pc

[PATCH 3/5] roms/efi: exclude efi shell from secure boot builds

2024-03-14 Thread Gerd Hoffmann
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4641 Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index 05cbafef70cb..ef3eb7beebe7 100644 --- a/roms/edk2-build.config +++ b

[PATCH 4/5] roms/efi: use pure 64-bit build for edk2-x86_64-secure-code.fd

2024-03-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index ef3eb7beebe7..cc9b21154205 100644 --- a/roms/edk2-build.config +++ b/roms/edk2-build.config @@ -70,11 +70,11

[PATCH 1/5] roms/efi: clean up edk2 build config

2024-03-14 Thread Gerd Hoffmann
Needed to avoid stale toolchain configurations breaking firmware builds. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/Makefile b/roms/Makefile index 8e5d8d26a9a0..edc234a0e886 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -187,6

[PATCH v3 2/3] kvm: add support for guest physical bits

2024-03-13 Thread Gerd Hoffmann
address bits. When set pass this to the guest, using cpuid too. Guest firmware can use this to figure how big the usable guest physical address space is, so PCI bar mapping are actually reachable. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.h | 1 + target/i386/cpu.c | 1

[PATCH v3 1/3] [debug] log kvm supported cpuid

2024-03-13 Thread Gerd Hoffmann
--- target/i386/kvm/kvm.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index e68cbe929302..2f5e3b9febf9 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -276,6 +276,20 @@ static struct kvm_cpuid2

[PATCH v3 3/3] target/i386: add guest-phys-bits cpu property

2024-03-13 Thread Gerd Hoffmann
Allows to set guest-phys-bits (cpuid leaf 8008, eax[23:16]) via -cpu $model,guest-phys-bits=$nr. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c88c895a5b3e..e0d73b6ec654

  1   2   3   4   5   6   7   8   9   10   >