Re: [Qemu-devel] [PATCH] esp: add Tekram DC-390 emulation (PC SCSI adapter)

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 18:59, Hervé Poussineau ha scritto: > + > +static void dc390_class_init(ObjectClass *klass, void *data) > +{ > +DeviceClass *dc = DEVICE_CLASS(klass); > +PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); > + > +k->init = dc390_scsi_init; > +k->romfile = "INT13.BIN"; Is thi

Re: [Qemu-devel] [PATCH 0/10] Remove periodic wakeup from RTC timer

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 21:51, Anthony Liguori ha scritto: >> > The next two patches clean up the state of the RTC to eliminate a useless >> > duplication, and the tenth completes migration support. Still, backwards >> > migration is broken because the algorithms in the new device model are >> > pretty much

Re: [Qemu-devel] [PATCH for-1.2 1/4] qemu-thread: Let qemu_thread_is_self() return bool

2012-08-01 Thread Stefan Weil
Am 02.08.2012 02:48, schrieb Andreas Färber: qemu_cpu_is_self(), passing the return value through, will later be adapted to return bool as well. Signed-off-by: Andreas Färber --- qemu-thread-posix.c |2 +- qemu-thread-win32.c |2 +- qemu-thread.h |3 ++- 3 files changed,

[Qemu-devel] [Bug 1031955] [NEW] qemu-system-arm -M lm3s811evb fails

2012-08-01 Thread Lars Hamrén
Public bug reported: I am trying out examples from StellarisWare. When I try the uart_echo example, that initially tries to talk to the display, I get this: $ .../qemu-1.1.1/bin/qemu-system-arm -M lm3s811evb -kernel uart_echo/gcc/uart_echo.bin qemu: hardware error: strllaris_i2c_

[Qemu-devel] [Bug 1031955] Re: qemu-system-arm -M lm3s811evb fails

2012-08-01 Thread Lars Hamrén
I applied the patch from "Bug #1028260". Now I get the same behaviour with the git version as I get from 1.1.1., i.e. qemu: hardware error: strllaris_i2c_read: Bad offset 0xfc0 ... /Lars -- You received this bug notification because you are a member of qemu- devel-ml, which is subscri

Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-01 Thread Kevin Shanahan
On Thu, Aug 02, 2012 at 11:46:13AM +0930, Kevin Shanahan wrote: > On Thu, Aug 02, 2012 at 11:02:42AM +0930, Kevin Shanahan wrote: > > Set the block driver read_only flag for cdrom devices so that > > qmp_change_blockdev does not attempt to open cdrom files in read-write > > mode when changing media

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Miroslav Rezanina
- Original Message - > From: "Eric Blake" > To: "Miroslav Rezanina" > Cc: qemu-devel@nongnu.org, "Paolo Bonzini" > Sent: Wednesday, August 1, 2012 3:21:03 PM > Subject: Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img > > On 08/01/2012 04:03 AM, Miroslav Rezanina wrot

Re: [Qemu-devel] [PATCH v4 2/2] block: Support GlusterFS as a QEMU block backend

2012-08-01 Thread Bharata B Rao
On Wed, Aug 01, 2012 at 06:35:22PM +, Blue Swirl wrote: > > + > > +if (!transport) { > > +uri->transport = strdup("socket"); > > g_strdup Sorry about that, pitfalls of developing the parsing code out of line :( > > +static int qemu_gluster_parseuri(GlusterURI *uri, const char *fi

Re: [Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing

2012-08-01 Thread Benjamin Herrenschmidt
On Wed, 2012-08-01 at 21:37 -0500, Anthony Liguori wrote: > > But all of the DT initialization stuff that is leading to this > discussion in the first place is a gross hack to make a PV > architecture > work that took far too many short cuts. > > Building a DT in memory representing hardware inst

[Qemu-devel] [PATCH] qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function

2012-08-01 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang --- qemu-img.c | 27 --- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 80cfb9b..13db7a2 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1567,14 +1567,19 @@ static int img_resize(int argc, char **a

Re: [Qemu-devel] [PATCHv2] unicore32-softmmu: Add a minimal curses screen support

2012-08-01 Thread guanxuetao
> Am 01.08.2012 05:09, schrieb g...@mprc.pku.edu.cn: > > Why is a TCG helper missing with curses directly? Shouldn't that use > QEMU's console infrastructure and leave it to the user whether to use > curses as a backend at runtime? > > What is the problem you are trying to solve? If you just need s

[Qemu-devel] [PATCH 13/34] hmp: hmp_change(): don't rely on QERR_DEVICE_ENCRYPTED

2012-08-01 Thread Luiz Capitulino
This commit changes the way hmp_change() checks if an encryption key is required for the device to be inserted. Instead of checking for QERR_DEVICE_ENCRYPTED, hmp_change() now checks if the device was successfully inserted, is encrypted and is missing an encryption key. This change is needed beca

[Qemu-devel] [PATCH 17/34] qerror: drop QERR_SOCKET_CONNECT_IN_PROGRESS

2012-08-01 Thread Luiz Capitulino
This error is currently returned by inet_connect_opts(), however it causes the follow spurious message on HMP: (qemu) migrate tcp:0: migrate: Connection can not be completed immediately (qemu) But migration succeeds. inet_connect_opts() has a 'in_progress' argument that callers c

Re: [Qemu-devel] [PATCH] Remove ill-advised fallback when we cannot allocate from -mem-path

2012-08-01 Thread David Gibson
Marcelo, Anthony pointed out that you explicitly added this fallback in 618a568da4eda5c2e41fc4e58059546806afff6b. I'd like to know your reasoning as to why - as noted below this causes problems for us, and a situation where the fallback is desirable is not clear to me. On Wed, Aug 01, 2012 at 02

[Qemu-devel] [PATCH 30/34] qemu-ga: switch to the new error format on the wire

2012-08-01 Thread Luiz Capitulino
IMPORTANT: this BREAKS qemu-ga compatibility for the error response. Instead of returning something like: { "error": { "class": "InvalidParameterValue", "data": {"name": "mode", "expected": "halt|powerdown|reboot" } } } qemu-ga now returns: { "error": { "class": "GenericError",

[Qemu-devel] [PATCH for-1.2 3/4] cpu: Move thread field into CPUState

2012-08-01 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 40 +++- include/qemu/cpu.h |1 + 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index d0dd781..be89684 100644 --- a/cpu-defs.h +

[Qemu-devel] [PATCH for-1.2 v5 13/14] pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE

2012-08-01 Thread Andreas Färber
Some typedef'ed their state to PCIHostState. Use a proper struct, and use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber --- hw/alpha_typhoon.c |4 ++-- hw/bonito.c| 22 +++--- hw/dec_pci.c |4 ++-- hw/grackle_pci.c |

[Qemu-devel] [PATCH 15/34] net: inet_connect(), inet_connect_opts(): return -errno

2012-08-01 Thread Luiz Capitulino
Next commit wants to use this. Signed-off-by: Luiz Capitulino --- This patch is an interesting case, because one of the goal of the error format that's being replaced was that callers could use it to know the error cause (with error_is_type(). However, the new error format doesn't allow this as

[Qemu-devel] [PATCH for-1.2 v5 02/14] alpha_typhoon: QOM'ify Typhoon PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant and cast macro. Don't access DeviceState or PCIHostState indirectly through parent fields. Signed-off-by: Andreas Färber --- hw/alpha_typhoon.c | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hw/alpha_typhoon.c b/hw/alpha_typho

[Qemu-devel] [PATCH 29/34] qmp: switch to the new error format on the wire

2012-08-01 Thread Luiz Capitulino
IMPORTANT: this BREAKS QMP's compatibility for the error response. This commit changes QMP's wire protocol to make use of the simpler error format introduced by previous commits. There are two important (and mostly incompatible) changes: 1. Almost all error classes have been replaced by Generic

[Qemu-devel] [PATCH 07/34] qerror: QError: drop file, linenr, func

2012-08-01 Thread Luiz Capitulino
They have never been fully used and conflict with future error improvements. Also makes qerror_report() a proper function, as there's no point in having it as a macro anymore. Signed-off-by: Luiz Capitulino --- qerror.c | 20 +++- qerror.h | 8 +--- 2 files changed, 4 inser

[Qemu-devel] [PATCH 05/34] qerror: drop qerror_abort()

2012-08-01 Thread Luiz Capitulino
qerror_abort() depends on the 'file', 'func' and 'linenr' members of QError. However, these members are going to be dropped by the next commit, so let's drop qerror_abort() in favor of printing an error message to stderr plus a call to abort(). Signed-off-by: Luiz Capitulino --- qerror.c | 41 ++

[Qemu-devel] [PATCH 31/34] error, qerror: pass desc string to error calls

2012-08-01 Thread Luiz Capitulino
This commit changes all QERR_ macros to contain a human message (ie. the desc string found in qerr_table[]) instead of a json dictionary in string format. Before this commit, error_set() and qerror_report() would receive a json dictionary in string format and build a qobject from it. Now, both fun

[Qemu-devel] [PATCH 24/34] qapi-schema: add ErrorClass enum

2012-08-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qapi-schema.json | 26 ++ 1 file changed, 26 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 1b2d7f5..6be937b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3,6 +3,32 @@ # QAPI Schema ## +# @ErrorClass

[Qemu-devel] [PATCH 10/34] error: don't delay error message construction

2012-08-01 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes that to construct the error message when the error object is built (ie. when the error is reported). This simplifies the Error object. Signed-off-by: Luiz Capitulino --- error.c | 8 +--- qerror.c | 4 +--- 2

[Qemu-devel] [PATCH for-1.2 1/4] qemu-thread: Let qemu_thread_is_self() return bool

2012-08-01 Thread Andreas Färber
qemu_cpu_is_self(), passing the return value through, will later be adapted to return bool as well. Signed-off-by: Andreas Färber --- qemu-thread-posix.c |2 +- qemu-thread-win32.c |2 +- qemu-thread.h |3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-

[Qemu-devel] [PATCH 08/34] qerror: qerror_format(): return an allocated string

2012-08-01 Thread Luiz Capitulino
Simplifies current and future users. Signed-off-by: Luiz Capitulino --- error.c | 5 + qerror.c | 10 -- qerror.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/error.c b/error.c index 58f55a0..3a62592 100644 --- a/error.c +++ b/error.c @@ -65,10 +65,7 @@

Re: [Qemu-devel] [PATCH 01/18] smbios: Add a function to directly add an entry

2012-08-01 Thread Anthony Liguori
Corey Minyard writes: > On 08/01/2012 08:15 PM, Kevin O'Connor wrote: >> >> This approach, unfortunately, leads to extra code and "double >> handling" of infomation. >> >> The ultimate consumer of the data wants a binary struct which looks >> like: >> >> struct smbios_type_38 { >> struct smb

[Qemu-devel] [PATCH for-1.2 v5 03/14] bonito: QOM'ify Bonito PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant. Avoid accessing DeviceState or SysBusDevice indirectly through PCIHostState field. Drop global state by passing BonitoState as opaque and adding the IRQs and a pointer to PCIBonitoState to its state. Signed-off-by: Andreas Färber --- hw/bonito.c | 146 +

[Qemu-devel] [PATCH 03/34] qerror: QERR_DEVICE_ENCRYPTED: add filename info to human msg

2012-08-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qerror.c b/qerror.c index 082de98..b2ed0e3 100644 --- a/qerror.c +++ b/qerror.c @@ -81,7 +81,7 @@ static const QErrorStringTable qerror_table[] = { }, { .error_fmt =

Re: [Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing

2012-08-01 Thread Anthony Liguori
David Gibson writes: > At present the qemu_system_reset() function always performs the same basic > actions on all machines. This includes running all the reset handler > hooks, however the order in which they run is not controlled by the board > logic. Let's be careful here in referring to "bo

[Qemu-devel] [PATCH for-1.2 v5 09/14] prep_pci: QOM'ify Raven PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant and cast macro. Avoid accessing parent fields directly. Also add missing space and braces. Signed-off-by: Andreas Färber --- hw/prep_pci.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/prep_pci.c b/hw/prep_pci.c index a8cdc2

[Qemu-devel] [PATCH 11/34] qmp: query-block: add 'valid_encryption_key' field

2012-08-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- block.c | 1 + qapi-schema.json | 7 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index b38940b..9c113b8 100644 --- a/block.c +++ b/block.c @@ -2445,6 +2445,7 @@ BlockInfoList *qmp_query_block(Error **errp)

[Qemu-devel] [PATCH 06/34] qerror: avoid passing qerr pointer

2012-08-01 Thread Luiz Capitulino
Helps dropping/modifying qerror functions. Signed-off-by: Luiz Capitulino --- qerror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/qerror.c b/qerror.c index 5efccec..59025ea 100644 --- a/qerror.c +++ b/qerror.c @@ -346,10 +346,10 @@ static QErro

[Qemu-devel] [PATCH 04/34] qerror: reduce public exposure

2012-08-01 Thread Luiz Capitulino
qerror will be dropped in a near future, let's reduce its public exposure by making functions only used in qerror.c static. Signed-off-by: Luiz Capitulino --- qerror.c | 10 +- qerror.h | 5 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/qerror.c b/qerror.c index

[Qemu-devel] [PATCH for-1.2 2/4] cpu: Move CPU_COMMON_THREAD into CPUState

2012-08-01 Thread Andreas Färber
CPU_COMMON_THREAD was only used for Windows, adding an hThread field to CPU_COMMON. Move the field into QOM CPUState and change its type to HANDLE, which it is assigned from. This requires Windows headers, pulled in through qemu-thread.h. Signed-off-by: Andreas Färber --- cpu-defs.h |

Re: [Qemu-devel] [RFC 00/27]: add new error format

2012-08-01 Thread Amos Kong
On 01/08/12 21:29, Luiz Capitulino wrote: On Wed, 01 Aug 2012 19:33:27 +0800 Amos Kong wrote: On 31/07/12 22:44, Luiz Capitulino wrote: On Fri, 27 Jul 2012 18:31:41 -0300 Luiz Capitulino wrote: [Please, read below why this is an RFC] This series implements the 'Plan for error handling in

[Qemu-devel] [PATCH 18/34] error: drop unused functions

2012-08-01 Thread Luiz Capitulino
Besides of being unused, they operate on the current error format, which is going to be replaced soon. Useful replacements for the dropped functions will be added along with the new error format. Signed-off-by: Luiz Capitulino --- error.c | 48 ---

[Qemu-devel] [PATCH 12/34] hmp: hmp_cont(): don't rely on QERR_DEVICE_ENCRYPTED

2012-08-01 Thread Luiz Capitulino
This commit changes hmp_cont() to loop through all block devices and proactively set an encryption key for any encrypted device without a valid one. This change is needed because QERR_DEVICE_ENCRYPTED is going to be dropped by a future commit. Signed-off-by: Luiz Capitulino --- hmp.c | 43 +

[Qemu-devel] [PATCH 33/34] error: drop error_get_qobject()/error_set_qobject()

2012-08-01 Thread Luiz Capitulino
They are not used anymore. Also drops error_int.h. Signed-off-by: Luiz Capitulino --- error.c | 20 error_int.h | 28 qapi/qmp-dispatch.c | 1 - qemu-ga.c | 1 - 4 files changed, 50 deletions(-) delete mode 100644

[Qemu-devel] [PATCH for-1.2 v5 06/14] gt64xxx: QOM'ify GT64120 PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant. Introduce cast macro to drop dummy busdev field used with FROM_SYSBUS() macro that would've broken SYS_BUS_DEVICE(). Avoid accessing DeviceState indirectly through PCIHostState. Signed-off-by: Andreas Färber --- hw/gt64xxx.c | 35 --- 1

[Qemu-devel] [PATCH for-1.2 4/4] cpu: Move thread_kicked to CPUState

2012-08-01 Thread Andreas Färber
Change field type to bool. Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 14 +- include/qemu/cpu.h |1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index be89684..4018b88 100644 --- a/cpu-defs.h

[Qemu-devel] [PATCH for-1.2 v5 04/14] dec_pci: QOM'ify DEC 21154 PCI-PCI bridge

2012-08-01 Thread Andreas Färber
Introduce type constant. Introduce cast macro and drop dummy busdev field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Signed-off-by: Andreas Färber --- hw/dec_pci.c | 21 +++-- hw/dec_pci.h |2 ++ 2 files changed, 1

[Qemu-devel] [PATCH 09/34] qerror: don't delay error message construction

2012-08-01 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes qerror to construct the error message when the error object is built (ie. when the error is reported). This eliminates the need of storing a pointer to qerror_table[], which will be dropped soon, and also simplifies t

[Qemu-devel] [PULL for-1.2] QOM CPUState, part 4: initial field movements

2012-08-01 Thread Andreas Färber
Hello Anthony, Please pull a next batch of QOM CPUState refactorings, cherry-picked from my long-standing QOM CPUState part 4 series. Some parts of that series (s390 and xen) had already been merged. This batch now includes actual field movements common to softmmu and *-user. Patches depending on

Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-01 Thread Kevin Shanahan
On Thu, Aug 02, 2012 at 11:02:42AM +0930, Kevin Shanahan wrote: > Set the block driver read_only flag for cdrom devices so that > qmp_change_blockdev does not attempt to open cdrom files in read-write > mode when changing media. Hrm, this fixes my simple test case using the kvm monitor directly bu

[Qemu-devel] [PATCH 19/34] block: block_int: include qerror.h

2012-08-01 Thread Luiz Capitulino
Several block/ files are relying on qerror.h being provided by qapi-types.h. Fix this, as a future commit will change qapi-types.h not to provide qerror.h. Signed-off-by: Luiz Capitulino --- block_int.h | 1 + 1 file changed, 1 insertion(+) diff --git a/block_int.h b/block_int.h index d72317f..

[Qemu-devel] [PATCH for-1.2 v5 05/14] grackle_pci: QOM'ify Grackle PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant. Introduce cast macro to drop dummy busdev field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Drop no-op reset function. Signed-off-by: Andreas Färber --- hw/grackle_pci.c | 57 ++

Re: [Qemu-devel] [PATCH 01/18] smbios: Add a function to directly add an entry

2012-08-01 Thread Corey Minyard
On 08/01/2012 08:15 PM, Kevin O'Connor wrote: This approach, unfortunately, leads to extra code and "double handling" of infomation. The ultimate consumer of the data wants a binary struct which looks like: struct smbios_type_38 { struct smbios_structure_header header; u8 interface_t

[Qemu-devel] [PATCH for-1.2 v5 14/14] pci: Tidy up PCI host bridges

2012-08-01 Thread Andreas Färber
Uglify the parent field to enforce QOM-style access via casts. Don't just typedef PCIHostState, either use it directly or embed it. Signed-off-by: Andreas Färber --- hw/alpha_typhoon.c |2 +- hw/dec_pci.c |2 +- hw/grackle_pci.c |2 +- hw/gt64xxx.c | 26 ++

[Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-01 Thread David Gibson
A number of things need to occur during reset of the PAPR paravirtualized platform in a specific order. For example, the hash table needs to be cleared before the CPUs are reset, so that they initialize their register state correctly, and the CPUs need to have their main reset called before we set

[Qemu-devel] [PATCH for-1.2 v5 08/14] ppce500_pci: QOM'ify e500 PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant and cast macro. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber --- hw/ppce500_pci.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index 99748b3..e4f065a 100644 --- a/hw/p

[Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing

2012-08-01 Thread David Gibson
At present the qemu_system_reset() function always performs the same basic actions on all machines. This includes running all the reset handler hooks, however the order in which they run is not controlled by the board logic. This is incorrect: any modern real hardware will generally have some sor

[Qemu-devel] [0/2] Allow machine to control ordering of reset

2012-08-01 Thread David Gibson
As discussed with Anthony on a call this morning, there are cases where the machine really needs to explicitly control the ordering of various steps of a system_reset. This is currently possible only very indirectly and to a limited extent. These patches add support for having the machine take ex

[Qemu-devel] [PATCH for-1.2 v5 11/14] unin_pci: QOM'ify UniNorth PCI host bridges

2012-08-01 Thread Andreas Färber
Introduce type constants and cast macros. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber --- hw/unin_pci.c | 133 ++--- 1 files changed, 70 insertions(+), 63 deletions(-) diff --git a/hw/unin_pci.c b/hw/unin_pci.c index

[Qemu-devel] [PATCH for-1.2 v5 10/14] spapr_pci: QOM'ify sPAPR PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant. Introduce cast macro to drop bogus busdev field that would've broken SYS_BUS_DEVICE(). Signed-off-by: Andreas Färber --- hw/spapr_pci.c | 13 +++-- hw/spapr_pci.h |6 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/spapr_pci.c b/hw

[Qemu-devel] [PATCH 26/34] error, qerror: add ErrorClass argument to error functions

2012-08-01 Thread Luiz Capitulino
The new argument is added to functions qerror_report() and error_set(). It's stored in Error and QError. qerror_report_err() is also updated to take care of it. The QERR_ macros are changed to contain a place holder value for the new argument, so that the value is used on all current calls to qerr

Re: [Qemu-devel] [PATCH] esp: add Tekram DC-390 emulation (PC SCSI adapter)

2012-08-01 Thread Andreas Färber
Am 01.08.2012 18:59, schrieb Hervé Poussineau: > Difference with AMD PCscsi is that DC-390 contains a EEPROM, > and that a romfile is available to add INT13 support. > > This has been successfully tested on: > - MS DOS 6.22 (using DC390 ASPI driver) > - MS Windows 98 SE (using DC390 driver) > - MS

[Qemu-devel] [PATCH 01/34] monitor: drop unused monitor debug code

2012-08-01 Thread Luiz Capitulino
In the old QMP days, this code was used to find out QMP commands that might be calling monitor_printf() down its call chain. This is almost impossible to happen today, because the qapi converted commands don't even have a monitor object. Besides, it's been more than a year since I used this last t

[Qemu-devel] [PATCH 34/34] error, qerror: drop QDict member

2012-08-01 Thread Luiz Capitulino
Used to store error information, but it's unused now. Signed-off-by: Luiz Capitulino --- error.c | 4 qerror.c | 4 qerror.h | 1 - 3 files changed, 9 deletions(-) diff --git a/error.c b/error.c index 5c6c90f..b07ffa0 100644 --- a/error.c +++ b/error.c @@ -19,7 +19,6 @@ struct Err

Re: [Qemu-devel] [SeaBIOS PATCH 0/2] Allow non-contiguous APIC IDs (v3)

2012-08-01 Thread Kevin O'Connor
On Wed, Aug 01, 2012 at 10:47:35AM +0300, Gleb Natapov wrote: > On Tue, Jul 31, 2012 at 09:14:13PM -0400, Kevin O'Connor wrote: > > On Wed, Jul 25, 2012 at 03:45:28PM -0300, Eduardo Habkost wrote: > > > Changes v2 -> v3: > > > - Report I/O APIC ID = 0 on MP-table, too > > > > > > Changes v1 -> v2

[Qemu-devel] [PATCH 14/34] net: inet_connect(), inet_connect_opts(): add in_progress argument

2012-08-01 Thread Luiz Capitulino
It's used to indicate the special case where a valid file-descriptor is returned (ie. success) but the connection can't be completed w/o blocking. Signed-off-by: Luiz Capitulino --- migration-tcp.c | 2 +- nbd.c | 2 +- qemu-char.c | 2 +- qemu-sockets.c | 14 +++--- qe

[Qemu-devel] [PATCH 20/34] hmp: hmp.h: include qdict.h

2012-08-01 Thread Luiz Capitulino
hmp.h is relying on qdict.h being provided by qapi-types.h. Fix this, as a future commit will change qapi-types.h not to provide qdict.h. Signed-off-by: Luiz Capitulino --- hmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hmp.h b/hmp.h index 8d2b0d7..3275522 100644 --- a/hmp.h +++ b/hmp

[Qemu-devel] [PATCH 25/34] qerror: qerror_table: don't use C99 struct initializers

2012-08-01 Thread Luiz Capitulino
This allows for changing QERR_ macros to initialize two struct members at the same time. See next commit for more details. Signed-off-by: Luiz Capitulino --- qerror.c | 276 +++ qerror.h | 2 +- 2 files changed, 139 insertions(+), 139

[Qemu-devel] [PATCH for-1.2 v5 12/14] pci_host: Turn into SysBus-derived QOM type

2012-08-01 Thread Andreas Färber
From: Andreas Färber The preceding commits fixed misuses of FROM_SYSBUS() that led people to add a bogus busdev field. For qdev the field order was less relevant but for QOM the PCIHostState field (including the SysBusDevice actually initialized with a value) must be placed first within the state

[Qemu-devel] [PATCH for-1.2 v5 07/14] ppc4xx_pci: QOM'ify ppc4xx PCI host bridge

2012-08-01 Thread Andreas Färber
Introduce type constant and cast macro. Avoid accessing its parent field directly. Signed-off-by: Andreas Färber --- hw/ppc440_bamboo.c |3 ++- hw/ppc4xx.h|2 ++ hw/ppc4xx_pci.c| 13 - 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/hw/ppc440_bam

[Qemu-devel] [PATCH for-1.2 v5 01/14] pci: Make host bridge TypeInfos const

2012-08-01 Thread Andreas Färber
During the QOM migration they were amended with further info but this is no longer the case. All static TypeInfos can be const these days. Signed-off-by: Andreas Färber --- hw/alpha_typhoon.c |2 +- hw/bonito.c|4 ++-- hw/dec_pci.c |6 +++--- hw/grackle_pci.c |4 +

[Qemu-devel] [PATCH for-1.2 v5 00/14] pci_host: Convert to QOM

2012-08-01 Thread Andreas Färber
Hello Anthony and Michael, Here's a fixed version of the series making pci_host a first-class QOM type. MAINTAINERS entries for the ppc devices touched herein are stripped from the series but being used for sending. They can be applied later through ppc-next. This series is a prerequisite for th

Re: [Qemu-devel] [RFC] Factor out fifos / circular buffers

2012-08-01 Thread Peter Crosthwaite
Alright, Ive put something together. Will CC on a series that will include it shortly. Regards, Peter On Wed, Aug 1, 2012 at 5:08 AM, Igor Mitsyanko wrote: > On 07/31/2012 02:20 PM, Peter Crosthwaite wrote: >> >> Hi All, >> >> A lot of devices have little internal fifos that are often implement

[Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-01 Thread Kevin Shanahan
Set the block driver read_only flag for cdrom devices so that qmp_change_blockdev does not attempt to open cdrom files in read-write mode when changing media. Signed-off-by: Kevin Shanahan --- Proposed fix for https://bugs.launchpad.net/qemu/+bug/1027525 diff -urN qemu-kvm-1.1.1.orig/blockdev.c

[Qemu-devel] [PATCH 28/34] error: add error_get_class()

2012-08-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- error.c | 5 + error.h | 5 + 2 files changed, 10 insertions(+) diff --git a/error.c b/error.c index 6c8f7b8..15a2d06 100644 --- a/error.c +++ b/error.c @@ -69,6 +69,11 @@ const char *error_get_pretty(Error *err) return err->msg; } +ErrorClass e

[Qemu-devel] [PATCH 27/34] qerror: add proper ErrorClass value for QERR_ macros

2012-08-01 Thread Luiz Capitulino
This commit replaces the place holder value for the ErrorClass argument with a proper ErrorClass value for all QERR_ macros. All current errors are mapped to GenericError, except for errors CommandNotFound, DeviceNotActive, DeviceNotFound, KVMMissingCap and MigrationExpected, which are maintained

[Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount

2012-08-01 Thread Kevin Shanahan
Of course, I mean "qmp_change_blockdev tries to open the device read- write". -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1027525 Title: Unable to insert cd media located on ro nfs mount Status

[Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount

2012-08-01 Thread Kevin Shanahan
Looks like the read_only flag in the block device state never gets set. This needs to be set otherwise qmp_change_blockdev tries to open the device read only. This patch works for me. ** Patch added: "Proposed fix" https://bugs.launchpad.net/qemu/+bug/1027525/+attachment/3245422/+files/cdroms-

[Qemu-devel] [PATCH RFC for-1.2] arm: Move some ARM devices into libhw

2012-08-01 Thread Andreas Färber
Signed-off-by: Andreas Färber --- Hello Peter, here's my current draft for subjecting more arm devices to the stricter device checks in libhwX. Please review desired granularity (here: fine-grained) and naming (e.g., PL310 vs. l2x0). Since this is preparing for a future armeb-softmmu, Anthony'

Re: [Qemu-devel] [PATCH 01/18] smbios: Add a function to directly add an entry

2012-08-01 Thread Kevin O'Connor
On Mon, Jul 30, 2012 at 12:25:16PM -0500, Anthony Liguori wrote: > Corey Minyard writes: > > On 07/30/2012 10:37 AM, Anthony Liguori wrote: > >> miny...@acm.org writes: > >>> There was no way to directly add a table entry to the SMBIOS table, > >>> even though the BIOS supports this. So add a fun

[Qemu-devel] [PATCH 32/34] qerror: drop qerror_table and qerror_format()

2012-08-01 Thread Luiz Capitulino
They are unused since last commit. Signed-off-by: Luiz Capitulino --- qerror.c | 400 --- qerror.h | 7 -- 2 files changed, 407 deletions(-) diff --git a/qerror.c b/qerror.c index db6bb47..e1606d3 100644 --- a/qerror.c +++ b/qerror.c

[Qemu-devel] [PATCH 23/34] qapi: don't convert enum strings to lowercase

2012-08-01 Thread Luiz Capitulino
Next commit will introduce enum strings in camel case. Signed-off-by: Luiz Capitulino --- scripts/qapi-types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 9b7da96..cf601ae 100644 --- a/scripts/qapi-types.py +++ b/script

[Qemu-devel] [PATCH 22/34] qapi: generate correct enum names for camel case enums

2012-08-01 Thread Luiz Capitulino
An enum like GenericError in the schema, should generate GENERIC_ERROR and not GENERICERROR. Signed-off-by: Luiz Capitulino --- scripts/qapi-types.py | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 3ed9f04..9b7d

[Qemu-devel] [PATCH 16/34] migration: don't rely on QERR_SOCKET_*

2012-08-01 Thread Luiz Capitulino
Use the error code returned by inet_connect() instead. This change is needed because all QERR_SOCKET_* errors are going to be dropped by a future commit. Signed-off-by: Luiz Capitulino --- migration-tcp.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-)

[Qemu-devel] [PATCH 21/34] qapi: qapi-types.h: don't include qapi/qapi-types-core.h

2012-08-01 Thread Luiz Capitulino
qapi-types.h needs only qemu-common.h. Including qapi-types-core.h causes problems when qerror.h or error.h includes qapi-types.h. Signed-off-by: Luiz Capitulino --- scripts/qapi-types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-t

[Qemu-devel] [PATCH 02/34] qerror: QERR_AMBIGUOUS_PATH: drop %(object) from human msg

2012-08-01 Thread Luiz Capitulino
Actually, renames it to 'object'. This must be what the original author meant to write, as there's no 'object' in the error's data member. Signed-off-by: Luiz Capitulino --- qerror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qerror.c b/qerror.c index 92c4eff..082de98 10

[Qemu-devel] [PATCH v1 00/34]: add new error format

2012-08-01 Thread Luiz Capitulino
Quick summary first, long introduction afterwards. >From the rfc: o rebased on top of master o dropped patch "qapi: qapi.py: allow the "'" character be escaped" o split patch "qerror: drop qerror_abort()" into two patches o fixed tcp_start_outgoing_migration() not to use QERR_ macros o fixed

Re: [Qemu-devel] [PATCH 0/10] Remove periodic wakeup from RTC timer

2012-08-01 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2012-08-02: > The current RTC emulation has two timers firing every second, one > on each edge of the UIP bit. This will prevent CPUs from staying at > deep C-states. Intel's measurements from previous submissions show the > C6 residency reduced by 6% when running 64 idle g

Re: [Qemu-devel] Cirrus bugs vs endian: how two bugs cancel each other out

2012-08-01 Thread Andreas Färber
Am 30.07.2012 18:01, schrieb Anthony Liguori: > I'm not saying that we should remove qxl.c from QEMU. We can continue > to support that ABI forever. > > But there's a lot of value in a new graphics interface that uses virtio > and negotiates support for the Spice protocol. That way, if QEMU > do

Re: [Qemu-devel] [PATCH v4 00/10] {alpha-}linux user improvements

2012-08-01 Thread Richard Henderson
Ping. r~ On 2012-07-25 15:10, Richard Henderson wrote: > Changes v3-v4: > Split patch 4 as per PMM feedback > Fix patch 9 is_error usage as per PPM feedback. > > Changes v2-v3: > Fix fcntl translation table in O_CLOEXEC patch. The O_LARGEFILE > entry could result in an end-of-table {0,0

Re: [Qemu-devel] [libvirt-users] Using virsh to load scripts for the guest machine

2012-08-01 Thread Eric Blake
On 08/01/2012 07:48 AM, Anthony Liguori wrote: >>> Basic one would be in case a machine has been paused for a long >>> time. You know as in "hey, you lazy vm! You have been sleeping for two >>> weeks! Now your clock is way off and poor ntp can't sync it back. So, >>> here's current date!" >>

Re: [Qemu-devel] [PATCH for-1.2] cpus: Register reset callback centrally

2012-08-01 Thread Andreas Färber
Am 01.08.2012 23:13, schrieb Andreas Färber: > Despite repeated protest commit 65dee38052597b6285eb208125369f01b29ba6c1 > (target-i386: move cpu_reset and reset callback to cpu.c) moved > registration of a reset callback from hw/pc.c to target-i386/cpu.c > while all other CPU reset handlers were st

Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c

2012-08-01 Thread Andreas Färber
Am 01.08.2012 23:43, schrieb Peter Maydell: > On 1 August 2012 22:25, Andreas Färber wrote: >> Am 01.08.2012 22:47, schrieb Anthony Liguori: >>> Relying on the CPU list for this isn't very QOM-like. A better approach >>> would be to make all CPUs appear in a container and then have the reset >>>

Re: [Qemu-devel] virtio-blk: Something bizarre with VIRTIO_BLK_T_GET_ID

2012-08-01 Thread Anthony Liguori
Benjamin Herrenschmidt writes: > Hi Anthony ! > > I was looking at virtio-blk.c as an example of some details regarding > the use of virtio queues. One thing I'm implementing is a > request/reponse model similar to what it does. > > One thing I noticed that sounds off to me but I might have misse

Re: [Qemu-devel] [PATCH 0/3] Move CPU model definitions to C

2012-08-01 Thread Andreas Färber
Am 01.08.2012 22:27, schrieb Eduardo Habkost: > On Wed, Aug 01, 2012 at 10:04:50PM +0200, Andreas Färber wrote: >> Am 01.08.2012 20:45, schrieb Eduardo Habkost: >>> This makes the change we discussed on the latest KVM conf call[1], moving >>> the >>> existing cpudefs from cpus-x86_64.conf to the C

Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c

2012-08-01 Thread Peter Maydell
On 1 August 2012 22:25, Andreas Färber wrote: > Am 01.08.2012 22:47, schrieb Anthony Liguori: >> Relying on the CPU list for this isn't very QOM-like. A better approach >> would be to make all CPUs appear in a container and then have the reset >> propagate through container. > > That doesn't work

Re: [Qemu-devel] [RFC PATCH 0/4] char: expose MemoryCharDriver to users and provide QMP interface

2012-08-01 Thread Anthony Liguori
Lei Li writes: > This RFC series attempts to convert the MemCharDriver to use a circular > buffer for input and output, expose it to users by introducing QMP commands > memchar_write and memchar_read and via the command line like the other > CharDriverStates. > > Serial ports in qemu always use C

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Introduce memchar_write QMP command

2012-08-01 Thread Anthony Liguori
Lei Li writes: > Signed-off-by: Lei Li > --- > qapi-schema.json | 20 > qemu-char.c | 19 +++ > qmp-commands.hx | 29 + > 3 files changed, 68 insertions(+), 0 deletions(-) > > diff --git a/qapi-schema.json b/qapi-schem

Re: [Qemu-devel] [RFC PATCH 1/4] qemu-char: Convert MemCharDriver to circular buffer

2012-08-01 Thread Anthony Liguori
Lei Li writes: > Signed-off-by: Lei Li > --- > qemu-char.c | 96 +++--- > qemu-char.h |2 +- > 2 files changed, 78 insertions(+), 20 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index c2aaaee..087c92d 100644 > --- a/qemu-cha

Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c

2012-08-01 Thread Andreas Färber
Am 01.08.2012 22:47, schrieb Anthony Liguori: > Andreas Färber writes: > >> Am 01.08.2012 22:02, schrieb Anthony Liguori: >>> Devices do one of two things today: >>> >>> 1) register a reset callback >>> >>> 2) implement a reset method that is invoked through it's parent bus >>> >>> Since I don't

Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c

2012-08-01 Thread Anthony Liguori
Andreas Färber writes: > Am 01.08.2012 22:02, schrieb Anthony Liguori: >> Andreas Färber writes: >> >>> Am 01.08.2012 20:25, schrieb Anthony Liguori: Andreas Färber writes: > Am 01.08.2012 17:43, schrieb Anthony Liguori: >> Igor Mammedov writes: >> >>> v2: >>>

[Qemu-devel] [PATCH for-1.2] cpus: Register reset callback centrally

2012-08-01 Thread Andreas Färber
Despite repeated protest commit 65dee38052597b6285eb208125369f01b29ba6c1 (target-i386: move cpu_reset and reset callback to cpu.c) moved registration of a reset callback from hw/pc.c to target-i386/cpu.c while all other CPU reset handlers were still registered from machines. Instead, improve the s

Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c

2012-08-01 Thread Andreas Färber
Am 01.08.2012 22:02, schrieb Anthony Liguori: > Andreas Färber writes: > >> Am 01.08.2012 20:25, schrieb Anthony Liguori: >>> Andreas Färber writes: >>> Am 01.08.2012 17:43, schrieb Anthony Liguori: > Igor Mammedov writes: > >> v2: >> ommited moving of x86_cpu_realize() f

Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c

2012-08-01 Thread Anthony Liguori
Andreas Färber writes: > Am 01.08.2012 22:02, schrieb Anthony Liguori: >> Devices do one of two things today: >> >> 1) register a reset callback >> >> 2) implement a reset method that is invoked through it's parent bus >> >> Since I don't expect CPUs to exist on a bus, it's not immediately cle

  1   2   3   4   >