Re: [PATCH v2 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-31 Thread Alexander Graf
On 31.08.23 10:53, Akihiko Odaki wrote: On 2023/08/31 17:12, Philippe Mathieu-Daudé wrote: On 30/8/23 18:14, Alexander Graf wrote: Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building

[PATCH v2 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-30 Thread Alexander Graf
Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building with clang. With this patch, I can successfully include GCD headers in QEMU when building with clang. Signed-off-by: Alexander Graf

[PATCH v2 10/12] hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2023-08-30 Thread Alexander Graf
callbacks on MMIO access as well as to share memory address space between the VM and PVG. This patch implements a QEMU device that drives PVG for the VMApple variant of it. Signed-off-by: Alexander Graf --- v1 -> v2: - Adapt to system_ss meson.build target --- meson.build |

[PATCH v2 03/12] hvf: Increase number of possible memory slots

2023-08-30 Thread Alexander Graf
For PVG we will need more than the current 32 possible memory slots. Bump the limit to 512 instead. Signed-off-by: Alexander Graf --- v1 -> v2: - Move max slot number to define --- include/sysemu/hvf_int.h | 4 +++- accel/hvf/hvf-accel-ops.c | 2 +- 2 files changed, 4 insertions(+)

[PATCH v2 12/12] hw/vmapple/vmapple: Add vmapple machine type

2023-08-30 Thread Alexander Graf
OS booting successfully. Signed-off-by: Alexander Graf --- v1 -> v2: - Adapt to system_ss meson.build target - Add documentation --- MAINTAINERS | 1 + docs/system/arm/vmapple.rst | 63 docs/system/target-arm.rst | 1 + hw/vmapple/vmapple.c

[PATCH v2 07/12] hw/vmapple/aes: Introduce aes engine

2023-08-30 Thread Alexander Graf
VMApple contains an "aes" engine device that it uses to encrypt and decrypt its nvram. It has trivial hard coded keys it uses for that purpose. Add device emulation for this device model. Signed-off-by: Alexander Graf --- hw/vmapple/aes.c

[PATCH v2 00/12] Introduce new vmapple machine type

2023-08-30 Thread Alexander Graf
ompatibilities. --- v1 -> v2: - Adapt to system_ss meson.build target - Add documentation - Rework virtio-blk patch to make all vmapple virtio-blk logic subclasses - Add log message on write - Move max slot number to define - Use SPDX header - Remove useless includes Alexande

[PATCH v2 11/12] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2023-08-30 Thread Alexander Graf
;vmapple-virtio-root" and "vmapple-virtio-aux". Signed-off-by: Alexander Graf --- v1 -> v2: - Rework to make all vmapple virtio-blk logic a subclass --- include/hw/pci/pci_ids.h| 1 + include/hw/virtio/virtio-blk.h | 12 +- include/hw/vmapple/virtio-blk.h |

[PATCH v2 09/12] hw/vmapple/cfg: Introduce vmapple cfg region

2023-08-30 Thread Alexander Graf
then map at the fixed location in the address space. That way, we can influence and annotate all configuration fields easily. Signed-off-by: Alexander Graf --- v1 -> v2: - Adapt to system_ss meson.build target --- include/hw/vmapple/cfg.h | 68 + hw/vmapple/cf

[PATCH v2 06/12] gpex: Allow more than 4 legacy IRQs

2023-08-30 Thread Alexander Graf
mode, GPEX will export more IRQ lines, one for each device. Signed-off-by: Alexander Graf --- include/hw/pci-host/gpex.h | 7 +++ hw/arm/sbsa-ref.c | 2 +- hw/arm/virt.c | 2 +- hw/i386/microvm.c | 2 +- hw/loongarch/virt.c| 2 +- hw/mips/loongson3_vir

[PATCH v2 08/12] hw/vmapple/bdif: Introduce vmapple backdoor interface

2023-08-30 Thread Alexander Graf
for guest recovery and I don't understand the protocol yet. Signed-off-by: Alexander Graf --- v1 -> v2: - Adapt to system_ss meson.build target --- include/hw/vmapple/bdif.h | 31 + hw/vmapple/bdif.c | 245 ++ hw/vmapple/Kconfig| 2 +

[PATCH v2 05/12] hw: Add vmapple subdir

2023-08-30 Thread Alexander Graf
We will introduce a number of devices that are specific to the vmapple target machine. To keep them all tidily together, let's put them into a single target directory. Signed-off-by: Alexander Graf --- MAINTAINERS | 6 ++ meson.build | 1 + hw/vmapple/trace.h

[PATCH v2 04/12] hvf: arm: Ignore writes to CNTP_CTL_EL0

2023-08-30 Thread Alexander Graf
MacOS unconditionally disables interrupts of the physical timer on boot and then continues to use the virtual one. We don't really want to support a full physical timer emulation, so let's just ignore those writes. Signed-off-by: Alexander Graf --- v1 -> v2: - Add log message on wr

[PATCH v2 02/12] hw/misc/pvpanic: Add MMIO interface

2023-08-30 Thread Alexander Graf
In addition to the ISA and PCI variants of pvpanic, let's add an MMIO platform device that we can use in embedded arm environments. Signed-off-by: Alexander Graf Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v1 -> v2: - Use SPDX header - Remove usel

Re: [PATCH 12/12] hw/vmapple/vmapple: Add vmapple machine type

2023-08-30 Thread Alexander Graf
On 20.06.23 19:35, Bernhard Beschow wrote: Am 14. Juni 2023 22:57:34 UTC schrieb Alexander Graf : Apple defines a new "vmapple" machine type as part of its proprietary macOS Virtualization.Framework vmm. This machine type is similar to the virt one, but with subtle differenc

Re: [PATCH 05/12] hw/virtio: Add support for apple virtio-blk

2023-08-24 Thread Alexander Graf
On 16.06.23 13:48, Kevin Wolf wrote: Am 15.06.2023 um 00:56 hat Alexander Graf geschrieben: Apple has its own virtio-blk PCI device ID where it deviates from the official virtio-pci spec slightly: It puts a new "apple type" field at a static offset in config space and introduces a n

Re: [PATCH 10/12] hw/vmapple/cfg: Introduce vmapple cfg region

2023-08-22 Thread Alexander Graf
On 16.06.23 12:47, Philippe Mathieu-Daudé wrote: On 15/6/23 00:57, Alexander Graf wrote: Instead of device tree or other more standardized means, VMApple passes platform configuration to the first stage boot loader in a binary encoded format that resides at a dedicated RAM region

Re: [PATCH 09/12] hw/vmapple/bdif: Introduce vmapple backdoor interface

2023-08-22 Thread Alexander Graf
On 16.06.23 12:39, Philippe Mathieu-Daudé wrote: On 15/6/23 00:56, Alexander Graf wrote: The VMApple machine exposes AUX and ROOT block devices (as well as USB OTG emulation) via virtio-pci as well as a special, simple backdoor platform device. This patch implements this backdoor platform

Re: [PATCH 00/12] Introduce new vmapple machine type

2023-06-21 Thread Alexander Graf
Hi Mads, On 20.06.23 13:17, Mads Ynddal wrote: On 15 Jun 2023, at 00.40, Alexander Graf wrote: This patch set introduces a new ARM and HVF specific machine type called "vmapple". It mimicks the device model that Apple's proprietary Virtualization.Framework exposes, but

Re: [PATCH 03/12] hvf: Increase number of possible memory slots

2023-06-21 Thread Alexander Graf
Hi Philippe, On 16.06.23 12:28, Philippe Mathieu-Daudé wrote: On 15/6/23 00:40, Alexander Graf wrote: For PVG we will need more than the current 32 possible memory slots. Bump the limit to 512 instead. Signed-off-by: Alexander Graf ---   accel/hvf/hvf-accel-ops.c | 2 +-   include/sysemu

[PATCH 12/12] hw/vmapple/vmapple: Add vmapple machine type

2023-06-14 Thread Alexander Graf
ble to see macOS booting successfully. Signed-off-by: Alexander Graf --- hw/vmapple/Kconfig | 19 ++ hw/vmapple/meson.build | 1 + hw/vmapple/vmapple.c | 661 + 3 files changed, 681 insertions(+) create mode 100644 hw/vmapple/vmapple.c diff

[PATCH 11/12] hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2023-06-14 Thread Alexander Graf
callbacks on MMIO access as well as to share memory address space between the VM and PVG. This patch implements a QEMU device that drives PVG for the VMApple variant of it. Signed-off-by: Alexander Graf --- hw/vmapple/Kconfig | 3 + hw/vmapple/apple-gfx.m | 578

[PATCH 10/12] hw/vmapple/cfg: Introduce vmapple cfg region

2023-06-14 Thread Alexander Graf
then map at the fixed location in the address space. That way, we can influence and annotate all configuration fields easily. Signed-off-by: Alexander Graf --- hw/vmapple/Kconfig | 3 ++ hw/vmapple/cfg.c | 105 +++ hw/vmapple/meson.build | 1

[PATCH 09/12] hw/vmapple/bdif: Introduce vmapple backdoor interface

2023-06-14 Thread Alexander Graf
for guest recovery and I don't understand the protocol yet. Signed-off-by: Alexander Graf --- hw/vmapple/Kconfig| 2 + hw/vmapple/bdif.c | 245 ++ hw/vmapple/meson.build| 1 + hw/vmapple/trace-events | 5 + include/hw/vmapple/bdif.h | 31

[PATCH 08/12] hw/vmapple/aes: Introduce aes engine

2023-06-14 Thread Alexander Graf
VMApple contains an "aes" engine device that it uses to encrypt and decrypt its nvram. It has trivial hard coded keys it uses for that purpose. Add device emulation for this device model. Signed-off-by: Alexander Graf --- hw/vmapple/Kconfig | 2 + hw/vmapple/aes.c

[PATCH 07/12] gpex: Allow more than 4 legacy IRQs

2023-06-14 Thread Alexander Graf
mode, GPEX will export more IRQ lines, one for each device. Signed-off-by: Alexander Graf --- hw/arm/sbsa-ref.c | 2 +- hw/arm/virt.c | 2 +- hw/i386/microvm.c | 2 +- hw/loongarch/virt.c| 2 +- hw/mips/loongson3_virt.c | 2 +- hw/openrisc/virt.c

[PATCH 05/12] hw/virtio: Add support for apple virtio-blk

2023-06-14 Thread Alexander Graf
virtio-blk-pci. When that property is set, we assume the virtio-blk device is an Apple one of the specific type and act accordingly. Signed-off-by: Alexander Graf --- hw/block/virtio-blk.c | 23 + hw/virtio/virtio-blk-pci.c | 7 +++ incl

[PATCH 06/12] hw: Add vmapple subdir

2023-06-14 Thread Alexander Graf
We will introduce a number of devices that are specific to the vmapple target machine. To keep them all tidily together, let's put them into a single target directory. Signed-off-by: Alexander Graf --- MAINTAINERS | 6 ++ hw/Kconfig | 1 + hw/meson.build

[PATCH 04/12] hvf: arm: Ignore writes to CNTP_CTL_EL0

2023-06-14 Thread Alexander Graf
MacOS unconditionally disables interrupts of the physical timer on boot and then continues to use the virtual one. We don't really want to support a full physical timer emulation, so let's just ignore those writes. Signed-off-by: Alexander Graf --- target/arm/hvf/hvf.c | 7 +++ 1 file

[PATCH 00/12] Introduce new vmapple machine type

2023-06-14 Thread Alexander Graf
nt to enable TSO Over time, I hope that some of the limitations above could cease to exist. This device model would enable very nice use cases with KVM on an Asahi Linux device. Alexander Graf (12): build: Only define OS_OBJECT_USE_OBJC with gcc hw/misc/pvpanic: Add MMIO interface hvf: Incr

[PATCH 02/12] hw/misc/pvpanic: Add MMIO interface

2023-06-14 Thread Alexander Graf
In addition to the ISA and PCI variants of pvpanic, let's add an MMIO platform device that we can use in embedded arm environments. Signed-off-by: Alexander Graf --- hw/misc/Kconfig | 4 +++ hw/misc/meson.build | 1 + hw/misc/pvpanic-mmio.c| 66

[PATCH 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-06-14 Thread Alexander Graf
Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building with clang. With this patch, I can successfully include GCD headers in QEMU when building with clang. Signed-off-by: Alexander Graf

[PATCH 04/12] hvf: arm: Ignore writes to CNTP_CTL_EL0

2023-06-14 Thread Alexander Graf
MacOS unconditionally disables interrupts of the physical timer on boot and then continues to use the virtual one. We don't really want to support a full physical timer emulation, so let's just ignore those writes. Signed-off-by: Alexander Graf --- target/arm/hvf/hvf.c | 7 +++ 1 file

[PATCH 03/12] hvf: Increase number of possible memory slots

2023-06-14 Thread Alexander Graf
For PVG we will need more than the current 32 possible memory slots. Bump the limit to 512 instead. Signed-off-by: Alexander Graf --- accel/hvf/hvf-accel-ops.c | 2 +- include/sysemu/hvf_int.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/hvf/hvf-accel-ops.c b

Re: [PATCH v2 28/32] contrib/gitdm: add Amazon to the domain map

2023-03-17 Thread Alexander Graf
from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. We have multiple contributors from both .co.uk and .com versions of the address. Signed-off-by: Alex Bennée Cc: Alexander Graf Cc: Paul Durrant Cc: David

Re: [PATCH] hw/block/nvme: fix legacy namespace registration

2021-02-11 Thread Alexander Graf
space") Reported-by: Alexander Graf Cc: Minwoo Im Signed-off-by: Klaus Jensen I can confirm that this fixes the upstream regression. Thanks a lot. Please work on a way with Peter to pull this into the tree as quickly as possible, so that we maintain a working master branch with NVMe

Re: [PULL 32/56] hw/block/nvme: split setup and register for namespace

2021-02-11 Thread Alexander Graf
Hi Klaus, On 09.02.21 08:30, Klaus Jensen wrote: From: Minwoo Im In NVMe, namespace is being attached to process I/O. We register NVMe namespace to a controller via nvme_register_namespace() during nvme_ns_setup(). This is main reason of receiving NvmeCtrl object instance to this function

Re: [Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-04-04 Thread Alexander Graf
On 04.04.17 08:58, Thomas Huth wrote: On 04.04.2017 08:53, Alexander Graf wrote: On 03.04.17 23:00, Eduardo Habkost wrote: On Mon, Apr 03, 2017 at 10:15:44PM +0200, Alexander Graf wrote: On 03.04.17 22:10, Eduardo Habkost wrote: On Mon, Apr 03, 2017 at 08:49:16PM +0100, Peter Maydell

Re: [Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-04-04 Thread Alexander Graf
On 03.04.17 23:00, Eduardo Habkost wrote: On Mon, Apr 03, 2017 at 10:15:44PM +0200, Alexander Graf wrote: On 03.04.17 22:10, Eduardo Habkost wrote: On Mon, Apr 03, 2017 at 08:49:16PM +0100, Peter Maydell wrote: On 1 April 2017 at 01:46, Eduardo Habkost <ehabk...@redhat.com> wrote:

Re: [Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-04-03 Thread Alexander Graf
On 03.04.17 22:10, Eduardo Habkost wrote: On Mon, Apr 03, 2017 at 08:49:16PM +0100, Peter Maydell wrote: On 1 April 2017 at 01:46, Eduardo Habkost wrote: commit 33cd52b5d7b9adfd009e95f07e6c64dd88ae2a31 unset cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making

Re: [Qemu-block] [PATCH 1/3] qcow2: Set MIN_L2_CACHE_SIZE to 2

2015-06-01 Thread Alexander Graf
On 01.06.15 18:09, Max Reitz wrote: The L2 cache must cover at least two L2 tables, because during COW two L2 tables are accessed simultaneously. Reported-by: Alexander Graf ag...@suse.de Cc: qemu-stable qemu-sta...@nongnu.org Signed-off-by: Max Reitz mre...@redhat.com Tested