Re: [Qemu-devel] QEMU savevm RAM page offsets

2013-08-13 Thread Laszlo Ersek
(apologies for responding to myself) On 08/13/13 18:51, Laszlo Ersek wrote: > On 08/13/13 18:03, Andreas Färber wrote: >> Hi, >> >> Am 13.08.2013 15:30, schrieb Juerg Haefliger: >>> I'm writing/extending a little tool (courtesy of Andrew @pikewerks) >>>

Re: [Qemu-devel] QEMU savevm RAM page offsets

2013-08-13 Thread Laszlo Ersek
On 08/13/13 21:06, Juerg Haefliger wrote: > On Tue, Aug 13, 2013 at 8:07 PM, Paolo Bonzini wrote: >> Il 13/08/2013 19:52, Juerg Haefliger ha scritto: >>> I didn't mean to imply that the savevm format is broken and needed >>> fixing. I was just wondering if the data is there and I simply hadn't >>>

Re: [Qemu-devel] Test report for xen-unstable and qemu-xen

2013-08-14 Thread Laszlo Ersek
On 08/14/13 11:19, Fabio Fantoni wrote: > Tried with qemu 1.4.2 and it works also with 4 gb of ram. > This ram regression seems to be introduced with qemu 1.5, and there is > another regression more critical with qemu 1.6. Can you save qemu's stderr for the 1.5->1.6 regression? > Tried to add se

Re: [Qemu-devel] Test report for xen-unstable and qemu-xen

2013-08-14 Thread Laszlo Ersek
On 08/14/13 12:54, Fabio Fantoni wrote: > Il 14/08/2013 11:56, Laszlo Ersek ha scritto: >> On 08/14/13 11:19, Fabio Fantoni wrote: >> >>> Tried with qemu 1.4.2 and it works also with 4 gb of ram. >>> This ram regression seems to be introduced with qemu 1.5, and the

Re: [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState

2014-05-12 Thread Laszlo Ersek
On 05/07/14 16:42, Marcel Apfelbaum wrote: > Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields > are copied into MachineState. Removed duplicated fields from MachineState. > > All the other changes are only mechanical refactoring, no semantic changes. > > Signed-off-by: Ma

Re: [Qemu-devel] Where is vga-rom mapped in guest system memory?

2014-05-13 Thread Laszlo Ersek
On 05/13/14 14:58, Jaeyong Yoo wrote: > Hello qemu! > > > > I am currently writing a vga device emulator and need to debug vga-bios. > > What I want is to set break-point on the entry of vga-bios and for this, > > I'm reading qemu source around pci device and rom-related memory regions > > t

Re: [Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for machines >= 2.1

2014-05-13 Thread Laszlo Ersek
ion_bits > > These updates should make this optional smbios structure more useful when > used with edk2/ovmf. Only pc machines 2.1 and newer are affected, and only > when the user explicitly requests that a type 0 struct be generated. > > Signed-off-by: Gabriel Somlo > --- >

Re: [Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for machines >= 2.1

2014-05-13 Thread Laszlo Ersek
On 05/13/14 17:56, Gabriel L. Somlo wrote: > On Tue, May 13, 2014 at 05:16:24PM +0200, Laszlo Ersek wrote: >> The idea and the implementation in this patch seems fine to me (and >> thanks for it!), except I object to the conversion of >> "bios_characteristics" to ui

Re: [Qemu-devel] [PATCH v2 1/2] SMBIOS: Fix endian-ness when populating fields wider than 8-bit

2014-05-13 Thread Laszlo Ersek
comments below On 05/13/14 20:17, Gabriel L. Somlo wrote: > When i386 guests are emulated on big endian hosts, make sure > fields wider than 8 bits are populated safely via cpu_to_le*(). > > Signed-off-by: Gabriel Somlo > --- > hw/i386/smbios.c | 91 > --

Re: [Qemu-devel] [PATCH v2 2/2] SMBIOS: Update Type 0 struct generator for machines >= 2.1

2014-05-13 Thread Laszlo Ersek
On 05/13/14 20:17, Gabriel L. Somlo wrote: > A type 0 (bios info) smbios structure is only generated if explicitly > requested on the command line. This patch updates the mechanism for > generating this type of structure as follows: > > - convert bios_characteristics field to uin64_t (instead of

Re: [Qemu-devel] [PATCH v2 1/2] SMBIOS: Fix endian-ness when populating fields wider than 8-bit

2014-05-13 Thread Laszlo Ersek
On 05/13/14 22:21, Gabriel L. Somlo wrote: > On Tue, May 13, 2014 at 10:09:45PM +0200, Paolo Bonzini wrote: >> Il 13/05/2014 20:17, Gabriel L. Somlo ha scritto: >>> -t->processor_id[0] = smbios_cpuid_version; >>> -t->processor_id[1] = smbios_cpuid_features; >>> +t->processor_id[0] = smb

Re: [Qemu-devel] Where is vga-rom mapped in guest system memory?

2014-05-14 Thread Laszlo Ersek
On 05/14/14 06:01, Jaeyong Yoo wrote: >> -Original Message- >> From: qemu-devel-bounces+jaeyong.yoo=samsung@nongnu.org [mailto:qemu- >> devel-bounces+jaeyong.yoo=samsung@nongnu.org] On Behalf Of Laszlo >> Ersek >> Sent: Tuesday, May 13, 2014 10:55 PM

Re: [Qemu-devel] Where is vga-rom mapped in guest system memory?

2014-05-14 Thread Laszlo Ersek
On 05/14/14 13:41, Jaeyong Yoo wrote: > I built the seabios in qemu and try to see the debug message of seabios. > So, I checked the "Serial port debugging" option in Debugging section with > the > serial port base address 0x3f8. (Is this the correct value?) > And, launch qemu with option "-seri

Re: [Qemu-devel] [PATCH v3 0/3] SMBIOS cleanup round

2014-05-14 Thread Laszlo Ersek
> 3 files changed, 65 insertions(+), 59 deletions(-) > series Reviewed-by: Laszlo Ersek

Re: [Qemu-devel] Where is vga-rom mapped in guest system memory?

2014-05-15 Thread Laszlo Ersek
On 05/15/14 15:25, Jaeyong Yoo wrote: >> I rely on the qemu debug port rather than on serial: >> >> -debugcon file:debug.log -global isa-debugcon.iobase=0x402 >> >> Check the DEBUG_IO and DEBUG_LEVEL settings in the SeaBIOS config as well. > > Thanks Laszlo! Now I can see the log message in Virt

Re: [Qemu-devel] Where is vga-rom mapped in guest system memory?

2014-05-16 Thread Laszlo Ersek
On 05/16/14 06:19, Jaeyong Yoo wrote: > By the way, would there be no-issue of VBox vgabios (16-bit code) working > with seaBIOS? I'm guessing not, but I want to double check. I presume it should "just work" (TM). Laszlo

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Laszlo Ersek
On 05/16/14 11:59, Jun Koi wrote: > - is it true that dump-guest-memory just write down physical memory > page, and does not consider the virtual-memory concept? No, it isn't. Basically, "dump-guest-memory" supports two modes of operation, "paging enabled" and "paging disabled". Many (most?) pe

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Laszlo Ersek
On 05/16/14 15:01, Jun Koi wrote: > > > > On Fri, May 16, 2014 at 7:30 PM, Laszlo Ersek <mailto:ler...@redhat.com>> wrote: > > On 05/16/14 11:59, Jun Koi wrote: > > > - is it true that dump-guest-memory just write down physical memory > &g

[Qemu-devel] [PATCH 3/7] dump: eliminate DumpState.page_shift ("guest's page shift")

2014-05-20 Thread Laszlo Ersek
fe. Suggested-by: Paolo Bonzini Signed-off-by: Laszlo Ersek --- include/sysemu/dump.h | 8 dump.c| 10 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index efab7a3..12af557 100644 --- a/include/s

[Qemu-devel] [PATCH 6/7] dump: hoist lzo_init() from get_len_buf_out() to dump_init()

2014-05-20 Thread Laszlo Ersek
_buf_out() more focused (single responsibility). Suggested-by: Paolo Bonzini Signed-off-by: Laszlo Ersek --- dump.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dump.c b/dump.c index 7e0982b..b87045e 100644 --- a/dump.c +++ b/dump.c @@ -1229,17 +1229,10 @@ stati

[Qemu-devel] [PATCH 7/7] dump: simplify get_len_buf_out()

2014-05-20 Thread Laszlo Ersek
We can (and should) rely on the fact that s->flag_compress is exactly one of DUMP_DH_COMPRESSED_ZLIB, DUMP_DH_COMPRESSED_LZO, and DUMP_DH_COMPRESSED_SNAPPY. This is ensured by the QMP schema and dump_init() in combination. Suggested-by: Paolo Bonzini Signed-off-by: Laszlo Ersek --- dum

[Qemu-devel] [PATCH 0/7] cleanups for compressed dumps (kdumps)

2014-05-20 Thread Laszlo Ersek
In March Paolo and Luiz had some comments for upstream qemu while they were reviewing my downstream port of Qiao Nuohan's compressed (kdump-format) dump feature. I've finally got around addressing them. Laszlo Ersek (7): dump: fill in the flat header signature more pleasingly to the

[Qemu-devel] [PATCH 5/7] dump: select header bitness based on ELF class, not ELF architecture

2014-05-20 Thread Laszlo Ersek
LASS64) vs. (EM_386, ELFCLASS32) keying off the same Long Mode Active flag. Hence no observable change. Approximately-suggested-by: Paolo Bonzini Signed-off-by: Laszlo Ersek --- dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump.c b/dump.c index e0a606f..7e0982b 10

[Qemu-devel] [PATCH 4/7] dump: eliminate DumpState.page_size ("guest's page size")

2014-05-20 Thread Laszlo Ersek
D_UP(s->max_mapnr, CHAR_BIT), s->page_size): The innermost "DumpState.max_mapnr" field has type uint64_t, which propagates through all implicit conversions at hand: #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) regardless of the page size macro

Re: [Qemu-devel] [PATCH 0/7] cleanups for compressed dumps (kdumps)

2014-05-20 Thread Laszlo Ersek
On 05/20/14 14:56, Paolo Bonzini wrote: > Il 20/05/2014 13:39, Laszlo Ersek ha scritto: >> In March Paolo and Luiz had some comments for upstream qemu while they >> were reviewing my downstream port of Qiao Nuohan's compressed >> (kdump-format) dump feature. I've fin

Re: [Qemu-devel] [CVE-2014-3615 PATCH v2 3/3] spice: make sure we don't overflow ssd->buf

2014-09-05 Thread Laszlo Ersek
ore the guest has a chance to do something > evil. > > Fix that by switching to dynamic allocation for the buffer. > > CVE-2014-3615 > > Cc: qemu-sta...@nongnu.org > Cc: secal...@redhat.com > Cc: Laszlo Ersek > Signed-off-by: Gerd Hoffmann > --- > ui/spice-di

Re: [Qemu-devel] [CVE-2014-3615 PATCH v2 3/3] spice: make sure we don't overflow ssd->buf

2014-09-05 Thread Laszlo Ersek
On 09/05/14 10:58, Gerd Hoffmann wrote: > Hi, > >> I can't track this back far enough. I'd feel safer if you checked that >> the multiplication can't overflow even in uint64_t. > > Effectively it comes from the emulated graphics hardware (anything in > hw/display/*). The gfx emulation must mak

Re: [Qemu-devel] [CVE-2014-3615 PATCH v2 3/3] spice: make sure we don't overflow ssd->buf

2014-09-05 Thread Laszlo Ersek
On 09/05/14 11:33, Gerd Hoffmann wrote: > On Fr, 2014-09-05 at 11:06 +0200, Laszlo Ersek wrote: >>> > > Makes sense. I think it is easier to just multiply in 64bit, then >> > check >>> > > the result is small enougth (new patch attached). >> >

Re: [Qemu-devel] [edk2] [PATCH 4/4] OvmfPkg: AcpiPlatformDxe: implement QEMU's full ACPI table loader interface

2014-09-07 Thread Laszlo Ersek
On 09/07/14 10:50, Michael S. Tsirkin wrote: > On Fri, Sep 05, 2014 at 10:52:16AM +0200, Laszlo Ersek wrote: >> On 08/26/14 02:12, Jordan Justen wrote: >>> On Mon, Aug 25, 2014 at 4:27 PM, Laszlo Ersek wrote: >>>> On 08/26/14 00:24, Jordan Justen wrote: >&g

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse

2014-09-09 Thread Laszlo Ersek
On 09/10/14 00:00, Gabriel L. Somlo wrote: > Executive summary: OS X (10.9.4) works on Q35 with usb keyboard+mouse when > booted on SeaBIOS with Chameleon , but not on OVMF [1]. > > [1] Recently patched acpi pm timer to boot on Q35, plus a bunch of pending > sata patches by Reza, cc-ed. > > C

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse

2014-09-10 Thread Laszlo Ersek
On 09/10/14 08:31, Gerd Hoffmann wrote: > Hi, > >> So at this point I'm wondering why guests and "info qtree" are contradictory, >> and whether the combination of OVMF and OS X tickle some qemu usb emulation >> bug differently than all other (working) combinations ? > > It's due to the way how

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse

2014-09-11 Thread Laszlo Ersek
On 09/11/14 22:16, Gabriel L. Somlo wrote: > On Thu, Sep 11, 2014 at 06:40:38PM +0200, Paolo Bonzini wrote: >> Il 11/09/2014 18:35, Gabriel L. Somlo ha scritto: > Can you configure Chamaleon to avoid the boot prompt? >>> Yes. After doing that, usb starts working once OS X is fully booted. >>> >

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse

2014-09-12 Thread Laszlo Ersek
On 09/12/14 21:59, Gabriel L. Somlo wrote: > On Fri, Sep 12, 2014 at 08:26:01PM +0200, Paolo Bonzini wrote: >> So it could be an OVMF bug related to multifunction devices. >> >> Well, you could try moving devices around in different functions. >> You could try moving ehci1 to 0 and the UHCIs to 1/2

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse

2014-09-15 Thread Laszlo Ersek
On 09/15/14 16:50, Gabriel L. Somlo wrote: > On Fri, Sep 12, 2014 at 03:59:52PM -0400, Gabriel L. Somlo wrote: >> On Fri, Sep 12, 2014 at 08:26:01PM +0200, Paolo Bonzini wrote: >>> So it could be an OVMF bug related to multifunction devices. >>> >>> Well, you could try moving devices around in diff

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse

2014-09-15 Thread Laszlo Ersek
On 09/15/14 17:07, Gabriel L. Somlo wrote: > On Mon, Sep 15, 2014 at 05:01:21PM +0200, Laszlo Ersek wrote: >>> diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c >>> index 289ca3b..bb230f1 100644 >>> --- a/hw/usb/hcd-ehci-pci.c >>> +++ b/hw/usb/hcd-eh

[Qemu-devel] [PATCH for-2.1 for-stable] vmstate_xhci_event: fix unterminated field list

2014-07-22 Thread Laszlo Ersek
esult is undefined behavior, which in my case translates to infinite recursion (because the loop happens to overflow into "vmstate_xhci_intr", which then links back to "vmstate_xhci_event"). Add the missing terminator. Signed-off-by: Laszlo Ersek --- hw/usb/hcd-xhci.c | 1 +

Re: [Qemu-devel] [PATCH for-2.1 for-stable] vmstate_xhci_event: fix unterminated field list

2014-07-22 Thread Laszlo Ersek
On 07/22/14 17:42, Paolo Bonzini wrote: > Il 22/07/2014 17:26, Laszlo Ersek ha scritto: >> "vmstate_xhci_event" was introduced in commit 37352df3 ("xhci: add live >> migration support"), and first released in v1.6.0. The field list in this >> VMSD is no

Re: [Qemu-devel] [PATCH 1/2] acpi-dsdt: procedurally generate _PRT

2014-07-23 Thread Laszlo Ersek
Package(4) { 0x[slot], [pin], [link], 0) } > + > +Store(Or(ShiftLeft(Local2, 16), 0x), Index(Local4, > 0)) > +Store(And(Local1, 3),Index(Local4, > 1)) > +Store(Local4,Index(Local0, > Local1)) > + > +Increment(Local1) > +} > + > +Return(Local0) > +} > } > > Field(PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) { > Awesome! Reviewed-by: Laszlo Ersek (In this case you might consider a "tested-by" more useful, but I can't promise to help in that regard.)

Re: [Qemu-devel] [PATCH 2/2] pc: hack for migration compatibility from QEMU 2.0

2014-07-23 Thread Laszlo Ersek
achine) > > static void pc_compat_2_0(MachineState *machine) > { > +/* This value depends on the actual DSDT and SSDT compiled into > + * the source QEMU; unfortunately it depends on the binary and > + * not on the machine type, so we cannot make pc-1.

Re: [Qemu-devel] [PATCH v2 for-2.1 1/2] acpi-dsdt: procedurally generate _PRT

2014-07-24 Thread Laszlo Ersek
| 90 +- > hw/i386/acpi-dsdt.hex.generated | 1910 > +++ > 2 files changed, 148 insertions(+), 1852 deletions(-) Compared with v1, v2 1/2 seems to reword the commit message a little bit, and add the generated file (requested by Igor, and mentioned by you anyway). Reviewed-by: Laszlo Ersek

Re: [Qemu-devel] [PATCH v2 for-2.1 2/2] pc: hack for migration compatibility from QEMU 2.0

2014-07-24 Thread Laszlo Ersek
tween 2.0 and 2.1. IOW, I think you could have kept this paragraph if you wanted to. Was it an oversight to drop it, or did the paragraph contain something incorrect (in v1) that I'm unaware of? Or is it just redundant? Reviewed-by: Laszlo Ersek Thanks, Laszlo

Re: [Qemu-devel] [PATCH for-2.1 0/2] Fix migration failure due to ACPI tables size changes

2014-07-25 Thread Laszlo Ersek
On 07/25/14 17:48, Igor Mammedov wrote: > Changing the ACPI table size causes migration to break, and the memory > hotplug work opened our eyes on how horribly we were breaking things in > 2.0 already. > > To trigger issue start > QEMU-1.7 with -M pc-i440fx-1.7 -device pci-bridge,chassis_nr=1 >

Re: [Qemu-devel] [PATCH for-2.1 1/2] migration: load smaller RAMBlock to a bigger one if permitted

2014-07-25 Thread Laszlo Ersek
On 07/25/14 17:48, Igor Mammedov wrote: > Add API to mark memory region as extend-able on migration, > to allow migration code to load smaller RAMBlock into > a bigger one on destination QEMU instance. > > This will allow to fix broken migration from QEMU 1.7/2.0 to > QEMU 2.1 due to ACPI tables

Re: [Qemu-devel] [PATCH for-2.1 2/2] acpi: mark ACPI tables ROM blob as extend-able on migration

2014-07-25 Thread Laszlo Ersek
le(_f, NULL, _a, _i, false) > #define rom_add_blob_fixed(_f, _b, _l, _a) \ > -rom_add_blob(_f, _b, _l, _a, NULL, NULL, NULL) > +rom_add_blob(_f, _b, _l, _a, NULL, NULL, NULL, false) > > #define PC_ROM_MIN_VGA 0xc > #define PC_ROM_MIN_OPTION 0xc8000 > Reviewed-by: Laszlo Ersek

Re: [Qemu-devel] [PATCH for-2.1 1/2] migration: load smaller RAMBlock to a bigger one if permitted

2014-07-28 Thread Laszlo Ersek
On 07/28/14 09:40, Igor Mammedov wrote: > On Fri, 25 Jul 2014 19:56:40 +0200 > Laszlo Ersek wrote: > >> On 07/25/14 17:48, Igor Mammedov wrote: >> >>> Add API to mark memory region as extend-able on migration, >>> to allow migration code to load sm

Re: [Qemu-devel] [PATCH for-2.1 v2 1/2] migration: load smaller RAMBlock to a bigger one if permitted

2014-07-28 Thread Laszlo Ersek
| 5 + > 5 files changed, 44 insertions(+), 5 deletions(-) Thank you. Reviewed-by: Laszlo Ersek

Re: [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive

2014-07-29 Thread Laszlo Ersek
; +comment += strlen(COMMENT_END); > +while (*comment == '\n') { > +comment++; > +} > +asl = g_string_erase(asl, 0, comment - asl->str); > } > > /* strip def block name (it has file path in it) */ > Reviewed-by: Laszlo Ersek

Re: [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1

2014-07-29 Thread Laszlo Ersek
On 07/28/14 23:27, Michael S. Tsirkin wrote: > On Mon, Jul 28, 2014 at 05:34:13PM +0200, Paolo Bonzini wrote: >> v3->v4: >> drop all pretense of supporting bridges [me] >> >> v2->v3: >> fix tests/acpi-test-data/pc/DSDT [Peter] >> track down "make check" failure, fix it [patch 4, me]

Re: [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1

2014-07-29 Thread Laszlo Ersek
uot;piix: set legacy table size for 1.7" more things just > work, so it's better to include it. I see. Thanks. > 1 acd727e acpi-dsdt: procedurally generate _PRT > 2 07fb617 pc: hack for migration compatibility from QEMU 2.0 These already have my R-b. > 3 3d5061f bio

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 15:20, Michael S. Tsirkin wrote: > On Tue, Jul 29, 2014 at 06:52:19AM -0400, Stefan Berger wrote: >> From: Stefan Berger >> >> Add an SSDT ACPI table for the TPM device. >> Add a TCPA table for BIOS logging area when a TPM is being used. >> >> The latter follows this spec here: >> >> h

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 16:46, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 04:36:38PM +0200, Laszlo Ersek wrote: >> On 07/30/14 15:20, Michael S. Tsirkin wrote: >>> On Tue, Jul 29, 2014 at 06:52:19AM -0400, Stefan Berger wrote: >>>> From: Stefan Berger >>>&g

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 17:03, Igor Mammedov wrote: > On Wed, 30 Jul 2014 16:36:38 +0200 > Laszlo Ersek wrote: > >> On 07/30/14 15:20, Michael S. Tsirkin wrote: >>> On Tue, Jul 29, 2014 at 06:52:19AM -0400, Stefan Berger wrote: >>>> From: Stefan Berger >>>>

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 17:10, Stefan Berger wrote: > Laszlo Ersek wrote on 07/30/2014 10:36:38 AM: > >> From: Laszlo Ersek >> To: "Michael S. Tsirkin" , Stefan Berger/Watson/IBM@IBMUS >> Cc: qemu-devel@nongnu.org, Stefan Berger >> Date: 07/30/2014 10:36 AM >&g

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 17:29, Stefan Berger wrote: > "Michael S. Tsirkin" wrote on 07/30/2014 11:20:41 AM: > >> From: "Michael S. Tsirkin" >> To: Stefan Berger/Watson/IBM@IBMUS >> Cc: Laszlo Ersek , qemu-devel@nongnu.org, Stefan >> Berger >> Date:

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 17:44, Stefan Berger wrote: > Laszlo Ersek wrote on 07/30/2014 11:41:10 AM: > >> From: Laszlo Ersek >> To: Stefan Berger/Watson/IBM@IBMUS, "Michael S. Tsirkin" >> Cc: qemu-devel@nongnu.org, Stefan Berger >> Date: 07/30/2014 11:41 AM >&g

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 17:37, Michael S. Tsirkin wrote: > 1. execute alloc instructions, building a data structure mapping fwcfg >file names to memory. Yes, edk2 currently lacks a good (== sub-linear) dictionary data type. This week I started porting a red-black tree library that I had originally writte

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 17:52, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 05:37:26PM +0200, Laszlo Ersek wrote: >> On 07/30/14 17:10, Stefan Berger wrote: >>> Laszlo Ersek wrote on 07/30/2014 10:36:38 AM: >>> >>>> From: Laszlo Ersek >>>> To: &q

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 18:05, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 11:59:43AM -0400, Stefan Berger wrote: >> "Michael S. Tsirkin" wrote on 07/30/2014 11:50:36 AM: >> >>> From: "Michael S. Tsirkin" >>> To: Stefan Berger/Watson/IBM@IBMUS

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 18:10, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 12:03:46PM -0400, Stefan Berger wrote: >> Laszlo Ersek wrote on 07/30/2014 11:58:52 AM: >>> In the short term, probably skip TCPA, or advise users in documentation >>> not to enable the TPM device

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 18:07, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 06:02:21PM +0200, Laszlo Ersek wrote: >> On 07/30/14 17:37, Michael S. Tsirkin wrote: >> >>> 1. execute alloc instructions, building a data structure mapping fwcfg >>>file names to memory.

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 18:11, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 06:07:28PM +0200, Laszlo Ersek wrote: >> On 07/30/14 17:52, Michael S. Tsirkin wrote: >>> How does EFI want to handle TCPA? Does caller allocate it >>> log and fill in the address? >> >>

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 18:35, Stefan Berger wrote: > Laszlo Ersek wrote on 07/30/2014 12:18:02 PM: > >> From: Laszlo Ersek >> To: "Michael S. Tsirkin" , Stefan Berger/Watson/IBM@IBMUS >> Cc: qemu-devel@nongnu.org, Stefan Berger >> Date: 07/30/2014 12:18 PM >&g

Re: [Qemu-devel] [PATCH] dump.c: Fix memory leak issue in cleanup processing for dump_init()

2014-08-03 Thread Laszlo Ersek
comments below On 08/03/14 17:28, Chen Gang wrote: > In dump_init(), when failure occurs, need notice about 'fd' and memory > mapping. So call dump_cleanup() for it (need let all initializations at > front). > > Also simplify dump_cleanup(): remove redundant 'ret' and redundant 'fd' > checking. >

Re: [Qemu-devel] [PATCH] acpi: align RSDP

2014-08-05 Thread Laszlo Ersek
> AcpiRsdpDescriptor *rsdp = acpi_data_push(rsdp_table, sizeof *rsdp); > > -bios_linker_loader_alloc(linker, ACPI_BUILD_RSDP_FILE, 1, > +bios_linker_loader_alloc(linker, ACPI_BUILD_RSDP_FILE, 16, > true /* fseg memory */); > > memcpy(&rsdp->signature, "RSD PTR ", 8); > Reviewed-by: Laszlo Ersek

Re: [Qemu-devel] [edk2] license for binary drivers

2014-08-06 Thread Laszlo Ersek
On 08/06/14 09:40, Reza Jelveh wrote: > Hello, > > EDK2 integrates FAT as a binary driver. What is the license of the FAT driver? https://svn.code.sf.net/p/edk2/code/trunk/edk2/FatBinPkg/License.txt > What are the guidelines for use of binary drivers with EDK2? Specifically if > you want to bund

[Qemu-devel] RFC: double free in qmp_output_visitor_cleanup()

2012-03-16 Thread Laszlo Ersek
r the problem, I'm attaching it. Thank you, Laszlo Original Message Date: Fri, 16 Mar 2012 13:55:48 +0100 From: Laszlo Ersek [...] Consider the following example: we want to put an int (I0) in a dict (D1) in a dict (D0). D0 is the root element. When we sta

[Qemu-devel] [PATCH] qmp_output_visitor_cleanup(): fix double free

2012-03-16 Thread Laszlo Ersek
enum inside a dictionary is an example for triggering the double free. [1] http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg03276.html Signed-off-by: Laszlo Ersek --- qapi/qmp-output-visitor.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qapi/qmp-output

[Qemu-devel] [PATCH v2 0/2] qapi: fix double free in QMP OV cleanup, add test case

2012-03-20 Thread Laszlo Ersek
v1->v2: added Paolo's test case as second patch in the series. Also tried to come up with a better subject for 1/2. Laszlo Ersek (1): qapi: fix double free in qmp_output_visitor_cleanup() Paolo Bonzini (1): qapi: add struct-errors test case to test-qmp-output-visitor qapi-schema-t

[Qemu-devel] [PATCH v2 1/2] qapi: fix double free in qmp_output_visitor_cleanup()

2012-03-20 Thread Laszlo Ersek
enum inside a dictionary is an example for triggering the double free. [1] http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg03276.html Signed-off-by: Laszlo Ersek --- qapi/qmp-output-visitor.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qapi/qmp-output

[Qemu-devel] [PATCH v2 2/2] qapi: add struct-errors test case to test-qmp-output-visitor

2012-03-20 Thread Laszlo Ersek
From: Paolo Bonzini This test case verifies that invalid native enums are caught, and causes qapi to tear down the QObject tree under construction, exercising the previous patch. Signed-off-by: Paolo Bonzini Signed-off-by: Laszlo Ersek --- qapi-schema-test.json |2 +- test-qmp-output

Re: [Qemu-devel] [PATCH 04/16] qapi: introduce OptsVisitor

2012-06-06 Thread Laszlo Ersek
Thank you very much for the review! One question below (and maybe some more later in response to other parts of the review): On 06/05/12 23:12, Paolo Bonzini wrote: > Il 22/05/2012 12:45, Laszlo Ersek ha scritto: >> Optarg values can be of scalar types str / bool / int / size. > &g

Re: [Qemu-devel] [PATCH 15/16] convert net_init_bridge() to NetClientOptions

2012-06-06 Thread Laszlo Ersek
On 06/05/12 23:05, Paolo Bonzini wrote: > Il 22/05/2012 12:45, Laszlo Ersek ha scritto: >> Signed-off-by: Laszlo Ersek >> --- >> net/tap.c | 23 --- >> 1 files changed, 12 insertions(+), 11 deletions(-) >> >> diff --git a/net/tap.

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-06 Thread Laszlo Ersek
On 06/05/12 23:13, Paolo Bonzini wrote: > There is one small mistake that needs to be addressed in a v2, so it > would be great if you could use the int*_t visitors to avoid > complicating the code with range checks. OK so this is what I see: (a) add < 0 checks to

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-06 Thread Laszlo Ersek
On 06/06/12 17:16, Michael Roth wrote: > On Wed, Jun 06, 2012 at 04:10:44PM +0200, Paolo Bonzini wrote: >> The uintXX visitors do not fail if you pass a negative value. I'm fine >> with including the patch with the small bug and fixing it as a >> follow-up, there's plenty of time before 1.2. > >

[Qemu-devel] [PATCH qom-next] qapi: exclude negative values in uint*_t Visitor interfaces

2012-06-06 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- (To be applied on top of 0f2de4a8.) qapi/qapi-visit-core.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 9a29674..81f697f 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-06 Thread Laszlo Ersek
On 06/06/12 18:49, Laszlo Ersek wrote: > The fallback (*v->type_int)() call stores an int64_t, according to its > prototype ("interface contract"). IMHO it shouldn't try to communicate a > mathematical value outside of [INT64_MIN, INT64_MAX]; it should report > an er

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-06 Thread Laszlo Ersek
On 06/06/12 18:14, Michael Roth wrote: > On Wed, Jun 06, 2012 at 05:30:03PM +0200, Laszlo Ersek wrote: >> value < 0 > > I think this last one will cause problems though, since uint64_t's > within the valid range for visit_type_uint64() will fail due to being > in

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-07 Thread Laszlo Ersek
On 06/06/12 22:09, Michael Roth wrote: > On Wed, Jun 06, 2012 at 06:49:19PM +0200, Laszlo Ersek wrote: >> The fallback (*v->type_int)() call stores an int64_t, according to its >> prototype ("interface contract"). IMHO it shouldn't try to communicate a >> m

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-07 Thread Laszlo Ersek
On 06/06/12 22:59, Andreas Färber wrote: > I've squashed the first three hunks on my qom-next-1 branch and am > listening what comes out of the discussion for the fourth one. I'm OK with dropping the fourth hunk, and thanks for squashing the first three already, because now I don't have to repost

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-09 Thread Laszlo Ersek
On 06/07/12 17:46, Paolo Bonzini wrote: > Il 07/06/2012 17:29, Michael Roth ha scritto: >> For QEMU <-> X serialization/deserialization, such as a visitor which >> implements a wire encoding (QMP being the only example currently), we need to >> take care that the wire encoding is compatible with th

Re: [Qemu-devel] [PATCH 1/8] qapi: Add Visitor interfaces for uint*_t and int*_t

2012-06-09 Thread Laszlo Ersek
On 06/08/12 17:35, Andreas Färber wrote: > From: Michael Roth > > This adds visitor interfaces for fixed-width integers types. > Implementing these in visitors is optional, otherwise we fall back to > visit_type_int() (int64_t) with some additional bounds checking to avoid > integer overflows for

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-09 Thread Laszlo Ersek
On 06/06/12 15:03, Laszlo Ersek wrote: > (b) make all Netdev integer types as strict as possible, remove > superfluous checks, The net init functions all depend on integer optarg values being non-negative. Originally this is (or should be...) ensured by parse_option_number() [qemu-op

Re: [Qemu-devel] [PATCH 1/8] qapi: Add Visitor interfaces for uint*_t and int*_t

2012-06-09 Thread Laszlo Ersek
On 06/09/12 17:16, Andreas Färber wrote: > Am 09.06.2012 17:03, schrieb Laszlo Ersek: >> On 06/08/12 17:35, Andreas Färber wrote: >>> From: Michael Roth >>> >>> This adds visitor interfaces for fixed-width integers types. >>> Implementing these in vi

[Qemu-devel] [PATCH v2 08/17] hw, net: "net_client_type" -> "NetClientOptionsKind" (qapi-generated)

2012-06-13 Thread Laszlo Ersek
NET_CLIENT_TYPE_ -> NET_CLIENT_OPTIONS_KIND_ Signed-off-by: Laszlo Ersek --- net.h | 16 +- hw/cadence_gem.c|2 +- hw/dp8393x.c|2 +- hw/e1000.c |2 +- hw/eepro100.c |2 +- hw/etraxfs_eth.c|

[Qemu-devel] [PATCH v2 13/17] convert net_init_socket() to NetClientOptions

2012-06-13 Thread Laszlo Ersek
ot;connect", "mcast" and "udp" in a separate union. However OptsVisitor's enum parser only supports the type=XXX QemuOpt instance as union discriminator. Signed-off-by: Laszlo Ersek --- net/socket.c | 119 +-

[Qemu-devel] [PATCH v2 11/17] convert net_init_dump() to NetClientOptions

2012-06-13 Thread Laszlo Ersek
v1->v2: - NetdevDumpOptions::len is of type 'size', whose C type was changed to uint64_t. Adapt the printf() format specifier macro. Signed-off-by: Laszlo Ersek --- net/dump.c | 21 + 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/net/dump.c

[Qemu-devel] [PATCH v2 10/17] convert net_init_nic() to NetClientOptions

2012-06-13 Thread Laszlo Ersek
v1->v2: - NetLegacyNicOptions::vectors is of type uint32 Signed-off-by: Laszlo Ersek --- net.c | 39 ++- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/net.c b/net.c index 2cf40a0..886961c 100644 --- a/net.c +++ b/net.c @@ -748,12 +748

[Qemu-devel] [PATCH v2 06/17] qapi schema: remove trailing whitespace

2012-06-13 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- qapi-schema.json | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 3b6e346..8a05b66 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -337,7 +337,7 @@ # @CPU: the index of the

[Qemu-devel] [PATCH v2 17/17] remove unused QemuOpts parameter from net init functions

2012-06-13 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- net/dump.h |5 ++--- net/slirp.h |5 ++--- net/socket.h|5 ++--- net/tap.h |9 - net/vde.h |5 ++--- net.c | 14 ++ net/dump.c |4 ++-- net/slirp.c |4 ++-- net/socket.c

[Qemu-devel] [PATCH v2 09/17] convert net_client_init() to OptsVisitor

2012-06-13 Thread Laszlo Ersek
t functions are not converted yet, thus the original QemuOpts instance is passed transparently. v1->v2: - NetLegacy::name is optional. Tracked it through all init functions: they all handle a NULL name. Updated commit message accordingly. Signed-off-by: Laszlo Ersek --- net/dump.h |

[Qemu-devel] [PATCH v2 01/17] qapi: fix error propagation

2012-06-13 Thread Laszlo Ersek
From: Paolo Bonzini Don't overwrite / leak previously set errors. Don't try to end a container that could not be started. Signed-off-by: Paolo Bonzini Signed-off-by: Laszlo Ersek --- error.h|4 +- error.c|4 +- qapi/qapi-vi

[Qemu-devel] [PATCH v2 16/17] convert net_init_bridge() to NetClientOptions

2012-06-13 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- net/tap.c | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7501eba..fdaab2b 100644 --- a/net/tap.c +++ b/net/tap.c @@ -512,21 +512,22 @@ static int net_bridge_run_helper(const char

[Qemu-devel] [PATCH v2 04/17] expose QemuOpt and QemuOpts struct definitions to interested parties

2012-06-13 Thread Laszlo Ersek
The only clients should be the existent "qemu-option.c", and the upcoming "qapi/opts-visitor.c". Signed-off-by: Laszlo Ersek --- qemu-option-internal.h | 53 qemu-option.c | 24 + 2 files ch

[Qemu-devel] [PATCH v2 03/17] qapi: introduce "size" type

2012-06-13 Thread Laszlo Ersek
v1->v2: - fall back to uint64 rather than int Signed-off-by: Laszlo Ersek --- qapi/qapi-visit-core.h |3 +++ qapi/qapi-visit-core.c |7 +++ scripts/qapi.py|2 ++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/qapi/qapi-visit-core.h b/qapi/qapi-vi

[Qemu-devel] [PATCH v2 14/17] convert net_init_vde() to NetClientOptions

2012-06-13 Thread Laszlo Ersek
v1->v2: - NetdevVdeOptions::port and ::mode are of type uint16. Remove superfluous range checks. Signed-off-by: Laszlo Ersek --- net/vde.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/net/vde.c b/net/vde.c index 8e60f68..703888c 100644 --- a/

[Qemu-devel] [PATCH v2 00/17] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-13 Thread Laszlo Ersek
ed separately. - (Rebase to current master.) [1] http://lists.nongnu.org/archive/html/qemu-devel/2012-04/msg02512.html Laszlo Ersek (16): qapi: generate C types for fixed-width integers [new] qapi: introduce "size" type [v

[Qemu-devel] [PATCH v2 07/17] qapi schema: add Netdev types

2012-06-13 Thread Laszlo Ersek
NetdevTapOptions::sndbuf and NetdevDumpOptions::len use the new "size" type. v1->v2: - NetLegacy::name is optional - NetLegacyNicOptions::vectors is of type uint32 - NetdevVdeOptions::port and ::mode are of type uint16 - NetLegacy::vlan has type int32 Signed-off-by: Laszlo Ers

[Qemu-devel] [PATCH v2 05/17] qapi: introduce OptsVisitor

2012-06-13 Thread Laszlo Ersek
range. (Internals could be extracted to "cutils.c".) - Allow negative values in opts_type_int(). - Rebase to nested Makefiles. Signed-off-by: Laszlo Ersek --- qapi/opts-visitor.h | 31 qapi/opts-visitor.c | 401 +++ qapi/Makefile.ob

[Qemu-devel] [PATCH v2 02/17] qapi: generate C types for fixed-width integers

2012-06-13 Thread Laszlo Ersek
(Long line folded using parens: <http://www.python.org/dev/peps/pep-0008/#maximum-line-length>.) Signed-off-by: Laszlo Ersek --- scripts/qapi.py |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index e062336..1292476 100644

[Qemu-devel] [PATCH v2 15/17] convert net_init_tap() to NetClientOptions

2012-06-13 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- net/tap.h |2 +- net/tap-aix.c |2 +- net/tap-bsd.c |2 +- net/tap-haiku.c |2 +- net/tap-linux.c |9 +++- net/tap-solaris.c |2 +- net/tap-win32.c | 11 +++-- net/tap.c | 111

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