Re: [PATCH v8 35/40] target/sparc: Remove pointless use of CONFIG_TCG definition

2021-09-29 Thread Mark Cave-Ayland
On 26/09/2021 23:27, Philippe Mathieu-Daudé wrote: The SPARC target only support TCG acceleration. Remove the CONFIG_TCG definition introduced by mistake in commit 78271684719 ("cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass"). Reported-by: Richard Henderson Reviewed-by: Richa

Re: [PATCH v8 36/40] target/sparc: Restrict has_work() handler to sysemu

2021-09-29 Thread Mark Cave-Ayland
On 26/09/2021 23:27, Philippe Mathieu-Daudé wrote: Restrict has_work() to sysemu. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index

Re: [PATCH v3 6/7] MAINTAINERS: Add information for OpenPIC

2021-09-29 Thread Mark Cave-Ayland
On 27/09/2021 05:48, David Gibson wrote: The OpenPIC interrupt controller was once the de facto standard on ppc machines. In qemu it's now only used on some Macintosh and the Freescale e500 machine. It has no listed maintainer, and as far as I know, no-one who's really familiar with it any mor

Re: [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps

2021-09-29 Thread Gerd Hoffmann
> > +#ifdef TCG_DIRECT_CALL > > void tlb_flush(CPUState *cpu); > > +#endif > > I'm pretty sure you can drop these ifdefs. Just because there's a regular > declaration for a function doesn't mean a subsequent inline definition does > not apply. Couldn't get this work. With "static inline" I ge

Re: [PATCH v4 23/25] linux-user/sparc: Implement setup_sigtramp

2021-09-29 Thread Mark Cave-Ayland
On 28/09/2021 03:00, Richard Henderson wrote: Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Cc: Mark Cave-Ayland Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h | 4 linux-user/sparc/s

Re: [RFC 0/3] virtio-gpu: Shared memory capability

2021-09-29 Thread Gerd Hoffmann
On Tue, Sep 28, 2021 at 03:15:45PM +0200, Antonio Caggiano wrote: > Previously part of [0], now a patch series on its own. > > This patch series cherry picks two commits from [1] and applies one fix > according to [2], which should answer Gerd's comment [3] on previous > patch. > > RFC as I belie

Re: [PATCH 0/3] rSTify SubmitAPatch, TrivialPatches, and SpellCheck wiki pages

2021-09-29 Thread Kashyap Chamarthy
On Tue, Sep 28, 2021 at 07:31:26PM +0200, Paolo Bonzini wrote: > On 22/09/21 14:10, Kashyap Chamarthy wrote: [...] > > docs/devel/spell-check.rst| 29 ++ > > docs/devel/submitting-a-patch.rst | 460 ++ > > docs/devel/trivial-patches.rst| 53 > >

Re: [PATCH v2 3/5] s390x: topology: CPU topology objects and structures

2021-09-29 Thread Thomas Huth
On 07/09/2021 14.45, Pierre Morel wrote: On 9/7/21 9:32 AM, Thomas Huth wrote: On 22/07/2021 19.42, Pierre Morel wrote: We use new objects to have a dynamic administration of the CPU topology. The highier level object is the S390 book. In a first implementation I didn't spot any migrati

Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/29/21 01:29, Alistair Francis wrote: > From: Alistair Francis > > Mark the shakti_c machine as not user creatable. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639 > Signed-off-by: Alistair Francis > --- > hw/riscv/shakti_c.c | 6 ++ > 1 file changed, 6 insertions(+) >

Re: [PATCH v12 16/16] machine: Make smp_parse return a boolean

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/29/21 04:58, Yanan Wang wrote: > Quoting one of the Rules described in include/qapi/error.h: > " > Whenever practical, also return a value that indicates success / > failure. This can make the error checking more concise, and can > avoid useless error object creation and destruction. Note th

Re: [PATCH v12 16/16] machine: Make smp_parse return a boolean

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 10:58:16AM +0800, Yanan Wang wrote: > Quoting one of the Rules described in include/qapi/error.h: > " > Whenever practical, also return a value that indicates success / > failure. This can make the error checking more concise, and can > avoid useless error object creation a

Re: [PATCH v5 18/20] nubus: add support for slot IRQs

2021-09-29 Thread Laurent Vivier
Le 29/09/2021 à 08:42, Mark Cave-Ayland a écrit : > On 24/09/2021 10:05, Philippe Mathieu-Daudé wrote: > >> On 9/24/21 11:01, Philippe Mathieu-Daudé wrote: >>> On 9/24/21 09:06, Mark Cave-Ayland wrote: On 23/09/2021 10:49, Philippe Mathieu-Daudé wrote: > On 9/23/21 11:13, Mark Cave-A

Re: [PATCH v6 00/20] nubus: bus, device, bridge, IRQ and address space improvements

2021-09-29 Thread Laurent Vivier
Le 24/09/2021 à 09:37, Mark Cave-Ayland a écrit : > This patchset is the next set of changes required to boot MacOS on the q800 > machine. The > main aim of these patches is to improve the Nubus support so that devices can > be plugged > into the Nubus from the command line i.e. > > -device

[RFC v2 0/2] virtio-gpu: Shared memory capability

2021-09-29 Thread Antonio Caggiano
Previously part of [0], now a patch series on its own. This patch series cherry picks two commits from [1] and applies one fix according to [2], which should answer Gerd's comment [3] on previous patch. RFC as I believe it needs a proper review from both authors of first two commits. v2: Squash

[RFC v2 2/2] virtio: Add shared memory capability

2021-09-29 Thread Antonio Caggiano
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' and the data structure 'virtio_pci_shm_cap' to go with it. They allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and disting

[RFC v2 1/2] virtio-gpu: hostmem

2021-09-29 Thread Antonio Caggiano
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano --- hw/display/virtio-gpu-pci.c| 14 ++ hw/display/virtio-gpu.c| 1 + hw/display/virtio-vga.c| 32 +++- include/hw/virtio/vi

Re: [PULL 00/20] NBD patches through 2021-09-27

2021-09-29 Thread Peter Maydell
On Mon, 27 Sept 2021 at 23:02, Eric Blake wrote: > > The following changes since commit 9b03a1178204598055f23f24e438fdddb5935df9: > > Merge remote-tracking branch > 'remotes/vivier2/tags/trivial-branch-for-6.2-pull-request' into staging > (2021-09-27 11:08:36 +0100) > > are available in the Gi

Re: [PULL 1/5] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

2021-09-29 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 05:49:15AM -0400, Michael S. Tsirkin wrote: > On Mon, Sep 27, 2021 at 10:33:42AM +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 03, 2021 at 04:52:03PM -0400, Michael S. Tsirkin wrote: > > > From: Marcel Apfelbaum > > > > > > Q35 has now ACPI hotplug enabled by default fo

Re: [External] Re: [PATCH] hostmem: change default prealloc threads number

2021-09-29 Thread Igor Mammedov
On Tue, 28 Sep 2021 00:47:01 +0800 Nan Wang wrote: > On 2021/9/27 11:16, David Hildenbrand wrote: > > On 27.09.21 15:19, Nan Wang wrote: > >> From: "wangnan.light" > >> > >> the default number of prealloc threads is 1, for huge memory backend > >> file, single thread touch page is really slow.

Re: [PATCH] hw/arm/virt: Allow additions to the generated device tree

2021-09-29 Thread Peter Maydell
On Wed, 29 Sept 2021 at 04:01, Simon Glass wrote: > On Tue, 28 Sept 2021 at 03:21, Peter Maydell wrote: > > So what *is* this patch doing? The subject says "Allow additions to > > the generated device tree", and the patch adds an option to > > "Merge a device tree binary (dtb) file into the gener

Re: [External] Re: [PATCH] hostmem: change default prealloc threads number

2021-09-29 Thread David Hildenbrand
On 29.09.21 11:05, Igor Mammedov wrote: On Tue, 28 Sep 2021 00:47:01 +0800 Nan Wang wrote: On 2021/9/27 11:16, David Hildenbrand wrote: On 27.09.21 15:19, Nan Wang wrote: From: "wangnan.light" the default number of prealloc threads is 1, for huge memory backend file, single thread touch pa

Re: [PATCH 0/6] virtio-iommu: Add ACPI support

2021-09-29 Thread Eric Auger
Hi Jean, On 8/27/21 3:30 PM, Jean-Philippe Brucker wrote: > Hi Eric, > > On Tue, Aug 17, 2021 at 04:58:01PM +0200, Eric Auger wrote: >> Hi Jean, >> >> On 8/10/21 10:45 AM, Jean-Philippe Brucker wrote: >>> Allow instantiating a virtio-iommu device on ACPI systems by adding a >>> Virtual I/O Transla

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Richard W.M. Jones
On Wed, Sep 29, 2021 at 10:01:55AM +0200, Michal Privoznik wrote: > Apparently, parsing vmx.genid is not as easy as I thought. Anyway, it > was brought up in a private thread that libvirt doesn't report correct > UUIDs. For instance for the following input: > > vm.genid = "-8536691797830587195"

Re: [External] Re: [PATCH] hostmem: change default prealloc threads number

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 11:05:31AM +0200, Igor Mammedov wrote: > On Tue, 28 Sep 2021 00:47:01 +0800 > Nan Wang wrote: > > > On 2021/9/27 11:16, David Hildenbrand wrote: > > > On 27.09.21 15:19, Nan Wang wrote: > > >> From: "wangnan.light" > > >> > > >> the default number of prealloc threads is

[PULL 00/20] Q800 for 6.2 patches

2021-09-29 Thread Laurent Vivier
00-for-6.2-pull-request for you to fetch changes up to 5ef251416b5116bbf7723f31ddf8a6949a2ac271: q800: configure nubus available slots for Quadra 800 (2021-09-29 10:45:19 +0200) Q800 Pull request 20210929 NuBus cleanup and i

[PULL 02/20] nubus-device: rename slot_nb variable to slot

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland This is in preparation for creating a qdev property of the same name. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-3-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- in

[PULL 18/20] nubus: add support for slot IRQs

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Each Nubus slot has an IRQ line that can be used to request service from the CPU. Connect the IRQs to the Nubus bridge so that they can be wired up using qdev gpios accordingly, and introduce a new nubus_set_irq() function that can be used by Nubus devices to control the s

[PULL 05/20] nubus: move slot bitmap checks from NubusDevice realize() to BusClass check_address()

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Allow Nubus to manage the slot allocations itself using the BusClass check_address() virtual function rather than managing this during NubusDevice realize(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20

Re: [PATCH] hw/misc: Add a virtual pci device to dynamically attach memory to QEMU

2021-09-29 Thread David Hildenbrand
On 27.09.21 14:28, david.dai wrote: On Mon, Sep 27, 2021 at 11:07:43AM +0200, David Hildenbrand (da...@redhat.com) wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. On 2

[PULL 19/20] q800: wire up nubus IRQs

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Nubus IRQs are routed to the CPU through the VIA2 device so wire up the IRQs using gpios accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-20-mark.cave-ayl...@ilande.co.uk> Signe

[PULL 04/20] nubus: use bitmap to manage available slots

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command line using a new qdev "slot" parameter for nubus devices. Update mac_nubus_bridge_init() to only allow slots 0x9

Re: [PATCH v3 1/2] sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot

2021-09-29 Thread Dov Murik
On 27/09/2021 20:00, Daniel P. Berrangé wrote: > On Wed, Aug 25, 2021 at 07:35:37AM +, Dov Murik wrote: >> Add the sev_add_kernel_loader_hashes function to calculate the hashes of >> the kernel/initrd/cmdline and fill a designated OVMF encrypted hash >> table area. For this to work, OVMF mu

[PULL 09/20] macfb: don't register declaration ROM

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland The macfb device is an on-board framebuffer and so is initialised by the system declaration ROM included within the MacOS toolbox ROM. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-10-mark.cave-ayl...@ilande.co.uk> Signed-of

[PULL 12/20] nubus: move nubus to its own 32-bit address space

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland According to "Designing Cards and Drivers for the Macintosh Family" the Nubus has its own 32-bit address space based upon physical slot addressing. Move Nubus to its own 32-bit address space and then use memory region aliases to map available slot and super slot ranges int

Re: [PATCH v3 2/2] x86/sev: generate SEV kernel loader hashes in x86_load_linux

2021-09-29 Thread Dov Murik
On 27/09/2021 20:03, Daniel P. Berrangé wrote: > On Wed, Aug 25, 2021 at 07:35:38AM +, Dov Murik wrote: >> If SEV is enabled and a kernel is passed via -kernel, pass the hashes of >> kernel/initrd/cmdline in an encrypted guest page to OVMF for SEV >> measured boot. >> >> Co-developed-by: Jam

[PULL 15/20] nubus: move NubusBus from mac-nubus-bridge to nubus-bridge

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Now that Nubus has its own address space rather than mapping directly into the system bus, move the Nubus reference from MacNubusBridge to NubusBridge. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <202109240

[PULL 01/20] nubus: add comment indicating reference documents

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-2-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/nubus/nubus-bus.c | 8 1 f

[PULL 10/20] nubus-device: remove nubus_register_rom() and nubus_register_format_block()

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Since there is no need to generate a dummy declaration ROM, remove both nubus_register_rom() and nubus_register_format_block(). These will shortly be replaced with a mechanism to optionally load a declaration ROM from disk to allow real images to be used within QEMU. Signe

[PULL 03/20] nubus-device: expose separate super slot memory region

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland According to "Designing Cards and Drivers for the Macintosh Family" each physical nubus slot can access 2 separate address ranges: a super slot memory region which is 256MB and a standard slot memory region which is 16MB. Currently a Nubus device uses the physical slot n

[PULL 11/20] nubus-device: add romfile property for loading declaration ROMs

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland The declaration ROM is located at the top-most address of the standard slot space. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-12-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/nubus/nubus.h

[PULL 06/20] nubus: implement BusClass get_dev_path()

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-7-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/nubus/nubus-bus.c | 16 1 file changed, 16 insertions

[PULL 17/20] nubus-bridge: make slot_available_mask a qdev property

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland This is to allow Macintosh machines to further specify which slots are available since the number of addressable slots may not match the number of physical slots present in the machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mat

[PULL 16/20] nubus-bridge: embed the NubusBus object directly within nubus-bridge

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Since nubus-bridge is a container for NubusBus then it should be embedded directly within the bridge device using qbus_create_inplace(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-17-m

[PULL 08/20] nubus: generate bus error when attempting to access empty slots

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland According to "Designing Cards and Drivers for the Macintosh Family" any attempt to access an unimplemented address location on Nubus generates a bus error. MacOS uses a custom bus error handler to detect empty Nubus slots, and with the current implementation assumes that

[PULL 14/20] mac-nubus-bridge: rename MacNubusState to MacNubusBridge

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland This better reflects that the mac-nubus-bridge device is derived from the nubus-bridge device, and that the structure represents the state of the bridge device and not the Nubus itself. Also update the comment in the file header to reflect that mac-nubus-bridge is specific

[PULL 13/20] nubus-bridge: introduce separate NubusBridge structure

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland This is to allow the Nubus bridge to store its own additional state. Also update the comment in the file header to reflect that nubus-bridge is not specific to the Macintosh. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier

[PULL 07/20] nubus: add trace-events for empty slot accesses

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Increase the max_access_size to 4 bytes for empty Nubus slot and super slot accesses to allow tracing of the Nubus enumeration process by the guest OS. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <202109240

[PULL 20/20] q800: configure nubus available slots for Quadra 800

2021-09-29 Thread Laurent Vivier
From: Mark Cave-Ayland Slot 0x9 is reserved for use by the in-built framebuffer whilst only slots 0xc, 0xd and 0xe physically exist on the Quadra 800. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210924073808.1041-21-mark.cave-

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Richard W.M. Jones
On Wed, Sep 29, 2021 at 10:33:43AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 29, 2021 at 10:20:44AM +0100, Richard W.M. Jones wrote: > > On Wed, Sep 29, 2021 at 10:01:55AM +0200, Michal Privoznik wrote: > > > Apparently, parsing vmx.genid is not as easy as I thought. Anyway, it > > > was broug

Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Michael Tokarev
29.09.2021 09:52, Cindy Lu wrote: For vdpa device, if the host support VIRTIO_NET_F_MAC we need to read the mac address from hardware, so need to check this bit, the logic is 1 if the host support VIRTIO_NET_F_MAC and the mac address is correct, qemu will use the mac address in hardware 2.if

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 10:20:44AM +0100, Richard W.M. Jones wrote: > On Wed, Sep 29, 2021 at 10:01:55AM +0200, Michal Privoznik wrote: > > Apparently, parsing vmx.genid is not as easy as I thought. Anyway, it > > was brought up in a private thread that libvirt doesn't report correct > > UUIDs. For

Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable

2021-09-29 Thread Bin Meng
On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis wrote: > > From: Alistair Francis > > Mark the shakti_c machine as not user creatable. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639 > Signed-off-by: Alistair Francis > --- > hw/riscv/shakti_c.c | 6 ++ > 1 file changed, 6 i

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Richard W.M. Jones
Looking at the qemu code the problem IMHO is: https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a798b6443b1930ae6c74dea/docs/specs/vmgenid.txt#L189 https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a798b6443b1930ae6c74dea/hw/acpi/vmgenid.c#L37 This byte swapping makes no sen

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 10:46:39AM +0100, Richard W.M. Jones wrote: > On Wed, Sep 29, 2021 at 10:33:43AM +0100, Daniel P. Berrangé wrote: > > Ultimately as long as the mapping from libvirt XML to guest visible > > string is consistent across drivers, that's sufficient. > > > > > Adding qemu-devel

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 10:57:19AM +0100, Richard W.M. Jones wrote: > Looking at the qemu code the problem IMHO is: > > https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a798b6443b1930ae6c74dea/docs/specs/vmgenid.txt#L189 > https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a7

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Richard W.M. Jones
On Wed, Sep 29, 2021 at 11:07:30AM +0100, Daniel P. Berrangé wrote: > I'm not sure if we actually need the full driver or not for testing > purposes. The the GenID is just in memory somewhere, and the somewhere > is reported via ACPI table entry. For QEMU its easy as the data is > exposed via fw_cf

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Richard W.M. Jones
On Wed, Sep 29, 2021 at 10:46:38AM +0100, Richard W.M. Jones wrote: > I don't know why we decided to use a GUID for this. The feature > itself (https://go.microsoft.com/fwlink/?LinkId=260709) defines it as > an 128 bit / 8 byte number. The only connection to GUIDs is the size. *cough* .. 16 byte

Re: [PATCH 0/1] vmx: Fix mapping

2021-09-29 Thread Richard W.M. Jones
On Wed, Sep 29, 2021 at 11:10:35AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 29, 2021 at 10:57:19AM +0100, Richard W.M. Jones wrote: > > Looking at the qemu code the problem IMHO is: > > > > https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a798b6443b1930ae6c74dea/docs/specs/vmgeni

Re: [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps

2021-09-29 Thread Richard Henderson
On 9/29/21 3:09 AM, Gerd Hoffmann wrote: TODO: Not sure whenever "check function pointer before call" or "function pointers to stubs" is better. Right now the patch has both which clearly doesn't make sense. Comments on that are welcome. I guess I don't mind either way, but we do need to pick

Re: [PATCH v12 3/7] [RISCV_PM] Support CSRs required for RISC-V PM extension except for the h-mode

2021-09-29 Thread Richard Henderson
On 9/28/21 3:00 PM, Alexey Baturo wrote: +switch (env->priv) { +case PRV_M: +cur_bit_pos = M_PM_CURRENT; +break; +case PRV_S: +cur_bit_pos = S_PM_CURRENT; +break; +case PRV_U: +cur_bit_pos = U_PM_CURRENT; +break; +default: +

blockdev driver=file,filename=/dev/block forbidden?

2021-09-29 Thread Michael Tokarev
Commit 8d17adf34f501ded65a106572740760f0a75577c "block: remove support for using "file" driver with block/char devices" explicitly forbids usage of file driver for block devices. But _why_? Hasn't we always used file for everything on *nix? And what's the _actual_ difference between file and hos

Re: [PATCH v12 16/16] machine: Make smp_parse return a boolean

2021-09-29 Thread Markus Armbruster
Yanan Wang writes: > Quoting one of the Rules described in include/qapi/error.h: > " > Whenever practical, also return a value that indicates success / > failure. This can make the error checking more concise, and can > avoid useless error object creation and destruction. Note that > we still h

Re: blockdev driver=file,filename=/dev/block forbidden?

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 02:21:58PM +0300, Michael Tokarev wrote: > Commit 8d17adf34f501ded65a106572740760f0a75577c > "block: remove support for using "file" driver with block/char devices" > explicitly forbids usage of file driver for block devices. > > But _why_? > > Hasn't we always used file f

Re: [PATCH 1/2] qga-win: Detect OS based on Windows 10 by first build number

2021-09-29 Thread Konstantin Kostiuk
ping On Tue, Sep 14, 2021 at 3:14 PM Kostiantyn Kostiuk wrote: > Windows Server 2016, 2019, 2022 are based on Windows 10 and > have the same major and minor versions. So, the only way to > detect the proper version is to use the build number. > > Before this commit, the guest agent use the last

Re: [PATCH] qapi: Make some ObjectTypes depend on the build settings

2021-09-29 Thread Markus Armbruster
Thomas Huth writes: > On 28/09/2021 19.39, Philippe Mathieu-Daudé wrote: >> I quickly opened qapi/qom.json and spotted another one: >> --- a/qapi/qom.json >> +++ b/qapi/qom.json >> @@ -870,3 +870,4 @@ >> 'tls-cipher-suites': 'TlsCredsProperties', >> - 'x-remote-object':

Re: blockdev driver=file,filename=/dev/block forbidden?

2021-09-29 Thread Michael Tokarev
29.09.2021 14:35, Daniel P. Berrangé wrote: On Wed, Sep 29, 2021 at 02:21:58PM +0300, Michael Tokarev wrote: Commit 8d17adf34f501ded65a106572740760f0a75577c "block: remove support for using "file" driver with block/char devices" explicitly forbids usage of file driver for block devices. But _wh

Re: blockdev driver=file,filename=/dev/block forbidden?

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 02:46:56PM +0300, Michael Tokarev wrote: > 29.09.2021 14:35, Daniel P. Berrangé wrote: > > On Wed, Sep 29, 2021 at 02:21:58PM +0300, Michael Tokarev wrote: > > > Commit 8d17adf34f501ded65a106572740760f0a75577c > > > "block: remove support for using "file" driver with block/c

Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Cindy Lu
On Wed, Sep 29, 2021 at 6:07 PM Michael Tokarev wrote: > > 29.09.2021 09:52, Cindy Lu wrote: > > For vdpa device, if the host support VIRTIO_NET_F_MAC > > we need to read the mac address from hardware, so need > > to check this bit, the logic is > > 1 if the host support VIRTIO_NET_F_MAC and the m

Re: QAPI sync meeting

2021-09-29 Thread Markus Armbruster
John Snow writes: > On Tue, Sep 28, 2021 at 9:53 AM Daniel P. Berrangé > wrote: > >> On Mon, Sep 27, 2021 at 12:55:34PM -0400, John Snow wrote: [...] >> > - Any weekday after 13:00 UTC. Wednesdays, Thursdays and Fridays work >> > particularly well for me at the moment. >> > - bluejeans and goo

Re: [PATCH v12 00/16] machine: smp parsing fixes and improvement

2021-09-29 Thread Paolo Bonzini
On 29/09/21 04:58, Yanan Wang wrote: Hi, This is a new version (v12) with minor update suggested by Daniel and Philippe. Two new commits (#1 and #16) are added. Thanks! Queued, thanks! Paolo Summary of v12: 1) Specifying a CPU topology parameter as zero was implicitly allowed but undocument

Re: [PULL 00/20] NBD patches through 2021-09-27

2021-09-29 Thread Paolo Bonzini
On 29/09/21 10:59, Peter Maydell wrote: This seems to break the gitlab cross-i386-system build, which now fails to link qemu-nbd because it is trying to link the x86-64 libselinux.so into a 32-bit binary: https://gitlab.com/qemu-project/qemu/-/jobs/1630661323 cc -o qemu-nbd qemu-nbd.p/qemu-nbd.

[PATCH] target/sh4: Use lookup_symbol in sh4_tr_disas_log

2021-09-29 Thread Richard Henderson
The correct thing to do has been present but commented out since the initial commit of the sh4 translator. Fixes: fdf9b3e831e Signed-off-by: Richard Henderson --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/translate.c b/target/sh4/transl

[PATCH v5 04/26] linux-user/arm: Drop "_v2" from symbols in signal.c

2021-09-29 Thread Richard Henderson
Since we no longer support "v1", there's no need to distinguish "v2". Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/arm/signal.c | 155 +--- 1 file changed, 65 insertions(+), 90 deletions(-) diff --git a/linux-user/arm/s

[PATCH v5 01/26] linux-user: Add infrastructure for a signal trampoline page

2021-09-29 Thread Richard Henderson
Allocate a page to hold the signal trampoline(s). Invoke a guest-specific hook to fill in the contents of the page before marking it read-execute again. Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/sig

[PATCH v5 02/26] linux-user/aarch64: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the rt signal trampoline. Use it when the guest does not use SA_RESTORER. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/aarch64/signal.c| 34 ++

[PATCH v5 08/26] linux-user/hexagon: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Continue to initialize the words on the stack, as documented. However, use the off-stack trampoline. Reviewed-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/hexagon/target_signal.h | 2 ++ linux-user/hexagon/signal.c| 19

[PATCH v5 00/26] linux-user: Move signal trampolines to new page

2021-09-29 Thread Richard Henderson
Changes for v5: * Fix arm thumb code copy. * Re-enable signals test (except hppa & sh4). Changes for v4: * Drop nios2 changes -- I still haven't built a full toolchain. * Clean up arm changes. * Minur i386 pointer type changes. Changes for v3: * Drop vdsos, reinstate setup_sigtramp fo

[PATCH v5 05/26] linux-user/arm: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Mirror what the kernel does in arch/arm/kernel/signal.h, using the old sigframe struct in the rt sigframe struct. Update the trampoline code to match the kernel: this uses sp-relative accesses rather than pc-relative. Copy the code into frame->retcode from the trampoline page. This minimises the

[PATCH v5 03/26] linux-user/arm: Drop v1 signal frames

2021-09-29 Thread Richard Henderson
Version 2 signal frames are used from 2.6.12 and since cbc14e6f286, we have set UNAME_MINIMUM_RELEASE to 2.6.32. Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/arm/signal.c | 220 +--- 1 file c

[PATCH v5 06/26] linux-user/alpha: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use ka_restorer. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/alpha/target_signal.h | 1 + linux-user/alpha/signal.c| 34 +++- 2 files chang

[PATCH v5 12/26] linux-user/m68k: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/m68k/target_signal.h | 2 ++ linux-user/m68k/signal.c| 47 +++-- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git

[PATCH v5 09/26] linux-user/hppa: Document non-use of setup_sigtramp

2021-09-29 Thread Richard Henderson
We cannot use a raw sigtramp page for hppa, but must wait for full vdso support. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/hppa/target_signal.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/linux-user/hppa

[PATCH v5 07/26] linux-user/cris: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Split out setup_sigreturn so that we can continue to initialize the words on the stack, as documented. However, use the off-stack trampoline. Cc: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/cris/target_signal.h | 2 ++ linux-user/cris/

[PATCH v5 18/26] linux-user/ppc: Simplify encode_trampoline

2021-09-29 Thread Richard Henderson
The sigret parameter is never 0, and even if it was the encoding of the LI instruction would still work. Reported-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/ppc/signal.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH v5 10/26] linux-user/i386: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Note that x86_64 does not use this code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/i386/target_signal.h | 2 ++ linux-user/x86_64/target_signal.h | 3 ++

[PATCH v5 13/26] linux-user/microblaze: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the rt signal trampoline. Cc: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/microblaze/target_signal.h | 2 ++ linux-user/microblaze/signal.c| 24 +--- 2 files changed, 19 insertions(+), 7 de

[PATCH v5 14/26] linux-user/mips: Tidy install_sigtramp

2021-09-29 Thread Richard Henderson
The return value is constant 0, and unused as well -- change to void. Drop inline marker. Change tramp type to uint32_t* for clarity. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/mips/signal.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) dif

[PATCH v5 11/26] linux-user/x86_64: Raise SIGSEGV if SA_RESTORER not set

2021-09-29 Thread Richard Henderson
This has been a fixme for some time. The effect of returning -EFAULT from the kernel code is to raise SIGSEGV. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/linux-user/i38

[PATCH v5 19/26] linux-user/ppc: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Cc: qemu-...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/ppc/target_signal.h | 2 ++ linux-user/ppc/signal.c| 34 ++ 2 files changed, 20 insertions(+), 16 deletions(-

[PATCH v5 17/26] linux-user/openrisc: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the rt signal trampoline. Reviewed-by: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/openrisc/target_signal.h | 2 ++ linux-user/openrisc/signal.c| 22 ++ 2 files changed, 16 insertions(+), 8 de

[PATCH v5 15/26] linux-user/mips: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/mips/target_signal.h | 1 + linux-user/mips64/target_signal.h | 2 ++ linux-user/mips/signal.c | 34 ++- 3 files changed, 27

[PATCH v5 20/26] linux-user/riscv: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the rt signal trampoline. This fixes a bug wrt libgcc fallback unwinding. It expects the stack pointer to point to the siginfo_t, whereas we had inexplicably placed our private signal trampoline at the start of the signal frame instead of the end. Now moot because we have remov

[PATCH v5 16/26] linux-user/nios2: Document non-use of setup_sigtramp

2021-09-29 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/nios2/target_signal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/nios2/target_signal.h b/linux-user/nios2/target_signal.h index aebf749f12..fe266c4c51 100644 --- a/linux-user/nios2/target_signal.h +

[PATCH v5 22/26] linux-user/sh4: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Cc: Yoshinori Sato Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/sh4/target_signal.h | 2 ++ linux-user/sh4/signal.c| 40 +++---

[PATCH v5 21/26] linux-user/s390x: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Cc: qemu-s3...@nongnu.org Tested-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/s390x/target_signal.h | 2 ++ linux-user/s390x/signal.c|

[PATCH v5 26/26] tests/tcg/multiarch: Re-enable signals test for most guests

2021-09-29 Thread Richard Henderson
With signal trampolines safely off the stack for all guests besides hppa, we can re-enable this test. It does show up a problem with sh4 (unrelated?), so leave that test disabled for now. Signed-off-by: Richard Henderson --- tests/tcg/hppa/Makefile.target | 7 +++ tests/tcg/i386/Makefi

[PATCH v5 24/26] linux-user/xtensa: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the rt signal trampoline. Use it when the guest does not use SA_RESTORER. Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/xtensa/target_signal.h | 2 ++ linux-user/xtensa/signal.c| 56 -

[PATCH 1/4] qemu-img: implement compare --stat

2021-09-29 Thread Vladimir Sementsov-Ogievskiy
With new option qemu-img compare will not stop at first mismatch, but instead calculate statistics: how many clusters with different data, how many clusters with equal data, how many clusters were unallocated but become data and so on. We compare images chunk by chunk. Chunk size depends on what b

[PATCH 3/4] qemu-img: add --shallow option for qemu-img compare --stat

2021-09-29 Thread Vladimir Sementsov-Ogievskiy
Allow compare only top images of backing chains. That's useful for comparing two increments from the same chain of incremental backups. Signed-off-by: Vladimir Sementsov-Ogievskiy --- docs/tools/qemu-img.rst | 8 +++- qemu-img.c | 14 -- qemu-img-cmds.hx| 4

[PATCH v5 23/26] linux-user/sparc: Implement setup_sigtramp

2021-09-29 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Acked-by: Mark Cave-Ayland Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h | 4 linux-user/sparc/signal.c

  1   2   3   >