[Qemu-devel] Re: [PATCH 09/15] usb-linux.c: fix warning with _FORTIFY_SOURCE

2010-01-05 Thread Kirill A. Shutemov
On Tue, Jan 5, 2010 at 4:42 PM, Juan Quintela quint...@trasno.org wrote: Kirill A. Shutemov kir...@shutemov.name wrote:   CC    usb-linux.o cc1: warnings being treated as errors usb-linux.c: In function 'usb_host_read_file': usb-linux.c:1204: error: ignoring return value of 'fgets', declared

[Qemu-devel] Re: [PULL] qemu/master: pci cleanups and a bugfix

2010-01-05 Thread Michael S. Tsirkin
ping On Wed, Dec 23, 2009 at 05:06:03PM +0200, Michael S. Tsirkin wrote: This includes pci cleanups, which I think are very safe. They have been out for quite a while. It also puts back interrupt disable bit support, which was mistakenly reverted on master. The following changes since

[Qemu-devel] [PATCH] Fix CPU topology initialization

2010-01-05 Thread Jiri Denemark
Late initialization of CPU topology in CPUState prevents KVM guests to actually see the topology. Signed-off-by: Jiri Denemark jdene...@redhat.com --- vl.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index e881e45..a03d7a6 100644 --- a/vl.c +++

[Qemu-devel] Re: [PATCH 09/15] usb-linux.c: fix warning with _FORTIFY_SOURCE

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 06:07:35PM +0200, Kirill A. Shutemov wrote: On Tue, Jan 5, 2010 at 4:42 PM, Juan Quintela quint...@trasno.org wrote: Kirill A. Shutemov kir...@shutemov.name wrote:   CC    usb-linux.o cc1: warnings being treated as errors usb-linux.c: In function

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Anthony Liguori
On 01/04/2010 11:34 AM, Amit Shah wrote: This commit converts the virtio-console device to create a new virtio-serial bus that can host console and generic serial ports. The file hosting this code is now called virtio-serial-bus.c. The virtio console is now a very simple qdev device that sits

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Amit Shah
Hey Anthony [skipping the part Gerd already answered] On (Tue) Jan 05 2010 [10:42:39], Anthony Liguori wrote: +static size_t send_control_msg(VirtIOSerialPort *port, void *buf, size_t len) +{ +VirtQueueElement elem; +VirtQueue *vq; +struct virtio_console_control *cpkt; + +

[Qemu-devel] Problem with fr-ca keymap.

2010-01-05 Thread Jérôme Poulin
When using the fr-ca keyboard there's a lot of missing punctuation and I really don't know to look at, it affects lots of product, qemu, kvm, Xen, which are all based on Qemu and I live with this problem everyday, using both SDL and VNC I get the same problem: Pressing dot [ . ] I get this message

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Anthony Liguori
On 01/05/2010 11:16 AM, Amit Shah wrote: +static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent) +{ +VirtIOSerialDevice *dev = DO_UPCAST(VirtIOSerialDevice, qdev, qdev); +VirtIOSerialPort *port = DO_UPCAST(VirtIOSerialPort, dev,dev-qdev); + +

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Anthony Liguori
On 01/05/2010 11:04 AM, Gerd Hoffmann wrote: Hi, - .driver = virtio-console-pci, + .driver = virtio-serial-pci, I don't think we can eliminate the virtio-console-pci device name. If someone used -writeconfig and -virtconsole in 0.12, this change would break their written config files. It

[Qemu-devel] [RFD] virtio: Add memory statistics reporting to the balloon driver

2010-01-05 Thread Adam Litke
This patch has been discussed (and ACKed) in the past, but has not yet been committed due to the congestion surrounding the 0.12 release and other conflicting changes. I would like to rekindle the discussion so that I can make the necessary changes to get this merged. This patch is ported to

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Gerd Hoffmann
Hi, - .driver = virtio-console-pci, + .driver = virtio-serial-pci, I don't think we can eliminate the virtio-console-pci device name. If someone used -writeconfig and -virtconsole in 0.12, this change would break their written config files. It wouldn't. virtio-console-pci was never fully

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread malc
On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 06:32:09PM +0300, malc wrote: On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread malc
On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: On Mon, Jan 04,

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 06:32:09PM +0300, malc wrote: On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: On

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread malc
On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: On 12/21/2009 02:09 AM, Paolo Bonzini wrote:

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote:

[Qemu-devel] Re: [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Amit Shah
On (Tue) Jan 05 2010 [10:27:19], Gerd Hoffmann wrote: Hi, +/* Guest wants to notify us of some event */ +static void handle_control_message(VirtIOSerial *vser, void *buf) +{ +cpkt-event = le16_to_cpu(cpkt-event); +cpkt-value = le16_to_cpu(cpkt-value); Does this modify guest

Re: [Qemu-devel] [PATCH 1/6] PCI config space access overhaul

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 09:46:38PM +0900, Isaku Yamahata wrote: diff --git a/hw/pci_host_template_all.h b/hw/pci_host_template_all.h new file mode 100644 index 000..74b3e84 --- /dev/null +++ b/hw/pci_host_template_all.h @@ -0,0 +1,23 @@ +#define PCI_HOST_BWLb +#define

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Anthony Liguori
On 01/05/2010 06:48 AM, Paolo Bonzini wrote: On 01/05/2010 12:59 AM, Anthony Liguori wrote: When I think of a main loop, I think of something that provides the following three services 1) fd based events 2) time based events 3) an idle callback The problem we have is that bottom halves

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Rusty Russell
On Mon, 4 Jan 2010 07:00:35 pm Christoph Hellwig wrote: On Mon, Jan 04, 2010 at 01:38:51PM +1030, Rusty Russell wrote: I thought this was what I was doing, but I have shown over and over that I have no idea about block devices. Our current driver treats BLK_SIZE as the logical and

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Paolo Bonzini
On 01/05/2010 12:59 AM, Anthony Liguori wrote: When I think of a main loop, I think of something that provides the following three services 1) fd based events 2) time based events 3) an idle callback The problem we have is that bottom halves aren't quite idle callbacks. They have some really

[Qemu-devel] [PATCH V11 13/27] pc: split out cpu initialization from pc_init1() into pc_cpus_init().

2010-01-05 Thread Isaku Yamahata
split out cpu initialization which is piix independent from pc_init1() into pc_cpus_init(). Later it will be used. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c | 32 +++- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/hw/pc.c

Re: [Qemu-devel] [PATCH 1/6] PCI config space access overhaul

2010-01-05 Thread Isaku Yamahata
Basically it looks good. Some minor comments below. Although further clean up is possible, this is first small step. On Mon, Jan 04, 2010 at 08:32:50AM +0100, Alexander Graf wrote: Different host buses may have different layouts for config space accessors. The Mac U3 for example uses the

[Qemu-devel] Re: Planning for 0.13

2010-01-05 Thread Anthony Liguori
On 01/05/2010 06:43 AM, Anthony Liguori wrote: Hi, I hope everyone had a happy new year! Now that we've finished the 0.12 release and most of us have had a nice break, I think it's time to start planning for the next release. 0.12 felt a bit rushed to me. I'd like to take a bit more time

[Qemu-devel] Planning for 0.13

2010-01-05 Thread Anthony Liguori
Hi, I hope everyone had a happy new year! Now that we've finished the 0.12 release and most of us have had a nice break, I think it's time to start planning for the next release. 0.12 felt a bit rushed to me. I'd like to take a bit more time with 0.13 and try to complete features a bit

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Avi Kivity
On 01/05/2010 02:56 PM, Rusty Russell wrote: Those should be the same for any sane interface. They are for classical disk devices with larger block sizes (MO, s390 dasd) and also for the now appearing 4k sector scsi disks. But in the ide world people are concerned about dos/window legacy

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: On 12/21/2009 02:09 AM, Paolo Bonzini wrote: Make the timer subsystem register its own bottom half

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Amit Shah
On (Mon) Jan 04 2010 [14:46:58], Anthony Liguori wrote: I'll annotate and read/write using the le format. Just use ldl_p and stl_p. (or ldw/stw as appropriate). OK, I've switched to ldl/stl. I'll send out the new series once the one I posted yesterday gets some time on the list. +static

[Qemu-devel] [PATCH V11 24/27] pc_smbus: remove #ifdef DEBUG.

2010-01-05 Thread Isaku Yamahata
remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc_smbus.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/pc_smbus.c b/hw/pc_smbus.c index 30cdaa7..1d44d1e 100644 --- a/hw/pc_smbus.c +++

Re: [Qemu-devel] [PATCH V4 11/18] fdc: support NEC PC-9821 interface

2010-01-05 Thread Gerd Hoffmann
+fdctrl_t *pc98_fdctrl_init (DriveInfo **fds) +{ +ISADevice *dev; +fdctrl_t *fdctrl; +int i; + +dev = isa_create(pc98-fdc); +qdev_prop_set_drive(dev-qdev, driveA, fds[0]); +qdev_prop_set_drive(dev-qdev, driveB, fds[1]); +if (qdev_init(dev-qdev) 0) +return

Re: [Qemu-devel] [PATCH V4 05/18] support NEC PC-9821 keyboard

2010-01-05 Thread Gerd Hoffmann
+void pc98_kbd_init(void) +{ +ISADevice *dev; + +dev = isa_create(pc98-kbd); +qdev_init_nofail(dev-qdev); +} There is no need for such a wrapper. You can use isa_create_simple(pc98-kbd); instead. Likewise for other devices (mouse, ...). cheers, Gerd

[Qemu-devel] [PATCH V11 21/27] acpi_piix4: qdevfy.

2010-01-05 Thread Isaku Yamahata
qdevfy acpi_piix4. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- changes v10 - v11: - pass DeviceState of piix4-pm to pc_smbus_init(). Now info qtree shows smbus. --- hw/acpi_piix4.c | 56 ++ 1 files changed, 43 insertions(+),

[Qemu-devel] Re: [PATCH V11 00/27] split out piix specific part from pc emulator and some clean ups

2010-01-05 Thread Gerd Hoffmann
On 01/05/10 07:27, Isaku Yamahata wrote: Now I addressed the minor nits Gerd pointed out, so now they are ready to commit, I think. whole series: Acked-by: Gerd Hoffmann kra...@redhat.com cheers, Gerd

Re: [Qemu-devel] [PATCH V4 04/18] support NEC PC-9821 architecture

2010-01-05 Thread Gerd Hoffmann
On 01/04/10 21:34, Anthony Liguori wrote: On 12/22/2009 11:40 AM, TAKEDA, toshiya wrote: I don't think we are really that far from being able to create an NEC PC-9821 based on careful use of -device and disabling default devices. I think the main issues some of the platform devices that

[Qemu-devel] Re: [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Gerd Hoffmann
Hi, +/* Guest wants to notify us of some event */ +static void handle_control_message(VirtIOSerial *vser, void *buf) +{ +cpkt-event = le16_to_cpu(cpkt-event); +cpkt-value = le16_to_cpu(cpkt-value); Does this modify guest memory? +DEFINE_PROP_UINT8(is_console,

Re: [Qemu-devel] [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Paolo Bonzini
On 01/04/2010 08:38 PM, Jamie Lokier wrote: In principle, if it does affect something, it seems likely there is already a buggy race condition. After all, if the timer and bottom half could trigger at the same time, which is the condition where the order is significant, then in principle the

[Qemu-devel] [PATCH V11 17/27] pc: split out pci device init from pc_init1() into pc_pci_device_init()

2010-01-05 Thread Isaku Yamahata
Split out pci device initialization from pc_init1() into pc_pci_device_init(). and removed unnecessary braces. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c | 35 +++ 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/hw/pc.c

[Qemu-devel] [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset

2010-01-05 Thread Huang Ying
Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does not follow the behavior in

[Qemu-devel] [PATCH V11 08/27] pc: make an unnecessary global variable, pit, local.

2010-01-05 Thread Isaku Yamahata
remove unnecessary global static variables, pit. Make it local. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index cdd9de6..0dee9d7 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -66,7 +66,6 @@

[Qemu-devel] [PATCH V11 04/27] acpi: split acpi.c into the common part and the piix4 part.

2010-01-05 Thread Isaku Yamahata
Split acpi.c into the common part and the piix4 specific part. The common part will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Makefile.target |4 +- hw/acpi.c | 557 --- hw/{acpi.c =

[Qemu-devel] [PATCH V11 18/27] pc: split out piix specific part from pc.c into pc_piix.c

2010-01-05 Thread Isaku Yamahata
Finally, we can safely split out the piix specific part from pc.c into pc_piix.c. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Makefile.target |2 +- hw/pc.c | 264 +- hw/pc.h | 33 +++ hw/pc_piix.c|

[Qemu-devel] [PATCH V11 00/27] split out piix specific part from pc emulator and some clean ups

2010-01-05 Thread Isaku Yamahata
Now I addressed the minor nits Gerd pointed out, so now they are ready to commit, I think. Anthony, can you please commit them? Gerd, thank you for your review. patch series description: This is the preparation patch for q35 chipset and PCIE support. This patch series is for spliting out piix

[Qemu-devel] [PATCH V11 16/27] pc: split out basic device init from pc_init1() into pc_basic_device_init()

2010-01-05 Thread Isaku Yamahata
Split out basic device, i.e. legacy devices like floppy, initialization from pc_init1() into pc_basic_device_init(). Later it will be used. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c | 87 +++--- 1 files changed, 49

[Qemu-devel] Re: [PATCH] Add definitions for current cpu models..

2010-01-05 Thread john cooper
Marcelo Tosatti wrote: On Mon, Dec 21, 2009 at 01:46:36AM -0500, john cooper wrote: +{ +.name = Opteron_G2, +.level = 5, +.vendor1 = CPUID_VENDOR_INTEL_1, +.vendor2 = CPUID_VENDOR_INTEL_2, +.vendor3 = CPUID_VENDOR_INTEL_3, Silly question: why a

Re: [Qemu-devel] cpuid problem in upstream qemu with kvm

2010-01-05 Thread john cooper
Anthony Liguori wrote: On 12/21/2009 02:28 AM, Dor Laor wrote: John's new cpu definitions are the exact solution for this issue - all users, whether using mgmt app or direct qemu (this is no user, this is a developer/hacker/other, let's do not optimize this case) should use the various 'real'

[Qemu-devel] [PATCH V11 05/27] acpi_piix4: remove unused variable in get_pmsts().

2010-01-05 Thread Isaku Yamahata
remove unused variable in get_pmsts(). Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/acpi_piix4.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 71b1156..802cd92 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@

[Qemu-devel] [PATCH V11 07/27] pc, i440fx: Make smm enable/disable function i440fx independent.

2010-01-05 Thread Isaku Yamahata
make cpu_smm_update() generic to be independent on i440fx by registering a callback. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c | 18 +++--- hw/pc.h |8 +++- hw/piix_pci.c |5 - 3 files changed, 26 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH V11 23/27] pci hotadd, acpi_piix4: remove global variables.

2010-01-05 Thread Isaku Yamahata
remove global variables, gpe and pci0_status by moving them into PIIX4PMState. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v10 - v11: - change callback argument of hotplug from void* to DeviceState*. --- hw/acpi_piix4.c | 72

[Qemu-devel] [PATCH V11 10/27] pc: remove global variable rtc_state by using qemu_irq.

2010-01-05 Thread Isaku Yamahata
Remove the reference to the global variable, rtc_state, by passing function argument to cmos_init_hd(), cmos_init(). And following d9c3231019a0fbacbe15dcb26a0e3708b726af77 which uses qemu_irq for powerdown to eliminate nasty #ifdef (TARGET_xxx), this patch removes #ifdef(TARGET_I386) and global

[Qemu-devel] [PATCH V11 20/27] rtc: make rtc_xxx accept/return ISADevice instead of RTCState.

2010-01-05 Thread Isaku Yamahata
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice instead of RTCState. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/mc146818rtc.c | 26 +++--- hw/mc146818rtc.h |8 hw/mips_jazz.c |1 + hw/mips_malta.c |3 ++-

[Qemu-devel] [PATCH V11 15/27] pc: split out vga initialization from pc_init1() into pc_vga_init().

2010-01-05 Thread Isaku Yamahata
Split out vga initialization which is independent of piix from pc_init1() as pc_vga_init(). Later it will be used. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c | 41 +++-- 1 files changed, 23 insertions(+), 18 deletions(-) diff --git

[Qemu-devel] [PATCH V11 12/27] pc: make pc_init1() not refer ferr_irq directly.

2010-01-05 Thread Isaku Yamahata
By introducing a registering function, make pc_init1() not refer to ferr_irq directly in order to make ferr_irq piix independent. Later pc_init1() will be split out into another file keeping ferr_irq static. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c |8 +++-

[Qemu-devel] [PATCH V11 14/27] pc: split out memory allocation from pc_init1() into pc_memory_init()

2010-01-05 Thread Isaku Yamahata
Split out memory allocation and rom/bios loading which doesn't depend on piix from pc_init1() into pc_memory_init(). Later it will be used. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c | 74 +++--- 1 files changed, 46

[Qemu-devel] [PATCH V11 03/27] acpi: add acpi constants from linux header files and use them.

2010-01-05 Thread Isaku Yamahata
add acpi constants from linux header files and replace the old constants with them. The acpi constants will be used by other file. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/acpi.c | 56 +++ hw/acpi.h | 78

[Qemu-devel] [PATCH V11 02/27] acpi: split out apm register emulation from acpi.c

2010-01-05 Thread Isaku Yamahata
Split out apm register emulation for acpi.c into pc_apm.c. The apm emulation will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Makefile.target |4 +- hw/acpi.c | 57 ++-- hw/pc_apm.c | 85

[Qemu-devel] [PATCH V11 06/27] pc: initialize ioapic before use.

2010-01-05 Thread Isaku Yamahata
The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6 prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic. However it would be better to initialize the member before reference. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c |6 +++--- 1 files changed, 3

[Qemu-devel] [PATCH V11 22/27] pci hotplug: add argument to pci hot plug callback.

2010-01-05 Thread Isaku Yamahata
Add argument, DeviceState*, to pci hot plug callback. The argument will be used later to remove global variable. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- changes v10 - v11: - change callback argument from void* to DeviceState*. --- hw/acpi_piix4.c |6 +++--- hw/pci.c

[Qemu-devel] [PATCH V11 01/27] acpi: split out pc smbus routines from acpi.c into pc_smbus.c

2010-01-05 Thread Isaku Yamahata
Split out pc smbus routines from acpi.c into pc_smbus.c and use it. The split out smbus emulation will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- changes v10 - v11 - add DeviceState *qdev argument to pc_smbus_init() for info qtree. --- Makefile.target |2 +

[Qemu-devel] [PATCH V11 27/27] mc146818rtc: remove #ifdef DEBUG_CMOS.

2010-01-05 Thread Isaku Yamahata
remove #ifdef DEBUG_CMOS by using macro. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/mc146818rtc.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index 1eb991c..0e1dc07 100644 --- a/hw/mc146818rtc.c

[Qemu-devel] [PATCH V11 11/27] pc: introduce a function to allocate cpu irq.

2010-01-05 Thread Isaku Yamahata
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq in order to make pic_irq_request() piix independent. Later piix code will be split out to another file keeping pic_irq_request() static. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c |7 ++- 1 files

[Qemu-devel] [PATCH V11 09/27] pc: remove a global variable, floppy_controller.

2010-01-05 Thread Isaku Yamahata
Remove a global variable, floppy_controller. Since it is unnecessarily global, make it local and pass it as a function argument. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/pc.c b/hw/pc.c

[Qemu-devel] [PATCH V11 26/27] pc_apm: remove #ifdef DEBUG.

2010-01-05 Thread Isaku Yamahata
remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pc_apm.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/pc_apm.c b/hw/pc_apm.c index f6bcd7d..e1cee96 100644 --- a/hw/pc_apm.c +++ b/hw/pc_apm.c @@ -23,6

[Qemu-devel] [PATCH V11 25/27] acpi_piix4: remove #ifdef DEBUG.

2010-01-05 Thread Isaku Yamahata
removed #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/acpi_piix4.c | 54 ++ 1 files changed, 18 insertions(+), 36 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index e64a2dd..2540626

[Qemu-devel] [PATCH V11 19/27] pc: move rtc declarations from pc.h into a dedicated header file.

2010-01-05 Thread Isaku Yamahata
Move rtc_xxx declarations from pc.h into mc146818rtc.h. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/mc146818rtc.h | 10 ++ hw/pc.h | 10 ++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 hw/mc146818rtc.h diff --git

[Qemu-devel] [PATCH 0/6] target-alpha: fpu qualifiers, round 2

2010-01-05 Thread Richard Henderson
I've split up the FPCR as requested by Aurelien. We no longer set anything in FP_STATUS after the execution of the operation, only copy data from FP_STATUS to some env-fpcr field. I have totally rewritten the patch to be more along the line that Laurent was suggesting, in that the rounding

[Qemu-devel] Re: Missing BIOS32 in QEMU 0.12.1

2010-01-05 Thread Kevin O'Connor
On Sun, Jan 03, 2010 at 10:37:58PM +0100, Aurelien Jarno wrote: Hi, I have just discovered that contrary to QEMU 0.11.x, version 0.12.1 does not support BIOS32. This is due to to the switch from pc-bios to SeaBIOS. This prevents booting certain OS like Hurd. Unfortunately QEMU 0.12.x does

[Qemu-devel] [PATCH 4/6] target-alpha: Clean up arithmetic traps.

2010-01-05 Thread Richard Henderson
Replace the EXCP_ARITH_OVERFLOW placeholder with the complete set of bits from the EXC_SUM IPR. Use them in the existing places where we raise arithmetic exceptions. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h | 10 +++--- target-alpha/op_helper.c | 12

[Qemu-devel] [PATCH] fix chardev_init for win32

2010-01-05 Thread TeLeMan
Before calling chardev_init_func(), socket_init() should be called on win32. --- vl.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0f59142..3b39cad 100644 --- a/vl.c +++ b/vl.c @@ -5768,6 +5768,10 @@ int main(int argc, char **argv, char

[Qemu-devel] [PATCH 5/6] target-alpha: Mark helper_excp as NORETURN.

2010-01-05 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/op_helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index 48245dd..a322f12 100644 --- a/target-alpha/op_helper.c +++ b/target-alpha/op_helper.c

[Qemu-devel] [PATCH 1/6] target-alpha: Fix gdb access to fpcr and unique.

2010-01-05 Thread Richard Henderson
cpu_gdb_read/write_register need to access the fpcr via the cpu_alpha_load/store_fpcr functions. The unique register is number 66 in the gdb remote protocol. Signed-off-by: Richard Henderson r...@twiddle.net --- gdbstub.c | 88 +--- 1

Re: [Qemu-devel] [patch] alpha-linux-user stat64 issue

2010-01-05 Thread Richard Henderson
On 12/28/2009 09:01 PM, Vince Weaver wrote: Hello The stat64/fstat64 syscalls are broken for alpha linux-user. This is because Alpha, even though it is native 64-bits, has a stat64 syscall that is different than regular stat. This means that the TARGET_LONG_BITS==64 check in syscall.c isn't

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Anthony Liguori
On 01/04/2010 02:01 PM, Paolo Bonzini wrote: On 01/04/2010 09:24 PM, Anthony Liguori wrote: I'm not a huge fan of this for a couple reasons. The first is that it introduces a subtle semantic change. Previously, timers always ran before bottom halves whereas after this change, timers may run

[Qemu-devel] [PATCH 3/6] target-alpha: Reduce internal processor registers for user-mode.

2010-01-05 Thread Richard Henderson
The existing set of IPRs is totally irrelevant to user-mode emulation. Indeed, they most are irrelevant to implementing kernel-mode emulation, and would only be relevant to PAL-mode emulation, which I suspect that no one will ever attempt. Reducing the set of processor registers reduces the size

[Qemu-devel] [PATCH] alpha-linux-user: Implement signals.

2010-01-05 Thread Richard Henderson
Move userland PALcode handling into linux-user main loop so that we can send signals from there. This also makes alpha_palcode.c system-level only, so don't build it for userland. Add defines for GENTRAP PALcall mapping to signals. Signed-off-by: Richard Henderson r...@twiddle.net ---

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Anthony Liguori
On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: On 12/21/2009 02:09 AM, Paolo Bonzini wrote: Make the timer subsystem register its own bottom half instead of placing the bottom half code in the heart of the main loop.

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 09:51:48AM +1100, Benjamin Herrenschmidt wrote: On Tue, 2010-01-05 at 00:25 +0200, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 08:53:52AM +1100, Benjamin Herrenschmidt wrote: Yes, but I think how you program your host to pci bridge is platform

Re: [Qemu-devel] [PATCH v2] Drop --whole-archive and static libraries

2010-01-05 Thread Blue Swirl
On Sun, Jan 3, 2010 at 12:31 PM, Blue Swirl blauwir...@gmail.com wrote: 2009/12/31 Andreas Färber andreas.faer...@web.de: From: Andreas Färber afaer...@opensolaris.org Juan has contributed a cool Makefile infrastructure that enables us to drop static libraries completely: Move shared obj-y

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Benjamin Herrenschmidt
On Mon, 2010-01-04 at 13:07 +0200, Michael S. Tsirkin wrote: BTW, I think we really should think about the right way to address the swap/noswap issue without using a preprocessor. Maybe make pci host bridge explicitly specify whether to swap bytes? How about adding a field in PCIHostState to

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: On 12/21/2009 02:09 AM, Paolo Bonzini wrote: Make the timer subsystem register its own bottom half instead of placing the bottom half code in the heart of the main loop. To test if an alarm timer is pending, just check if the

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Paolo Bonzini
On 01/04/2010 09:24 PM, Anthony Liguori wrote: I'm not a huge fan of this for a couple reasons. The first is that it introduces a subtle semantic change. Previously, timers always ran before bottom halves whereas after this change, timers may run after some bottoms halves but before others.

[Qemu-devel] Re: PCI: Fix bus address conversion (was Re: commit rules for common git tree)

2010-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2010 at 07:49:10PM +, Blue Swirl wrote: On Mon, Jan 4, 2010 at 7:10 PM, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jan 04, 2010 at 07:04:38PM +, Blue Swirl wrote: On Mon, Jan 4, 2010 at 6:33 PM, Michael S. Tsirkin m...@redhat.com wrote: On Sun, Dec 27, 2009

[Qemu-devel] [PATCHv2 3/3] kvm: move kvm to use memory notifiers

2010-01-05 Thread Michael S. Tsirkin
remove direct kvm calls from exec.c, make kvm use memory notifiers framework instead. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- exec.c| 17 + kvm-all.c | 40 ++-- kvm.h |8 3 files changed, 35 insertions(+),

[Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-05 Thread Michael S. Tsirkin
This adds notifiers for phys memory changes: a set of callbacks that vhost can register and update kernel accordingly. Down the road, kvm code can be switched to use these as well, instead of calling kvm code directly from exec.c as is done now. Signed-off-by: Michael S. Tsirkin m...@redhat.com

[Qemu-devel] [PATCHv2 0/3] qemu: memory notifiers

2010-01-05 Thread Michael S. Tsirkin
This patch against qemu upstream adds notifiers hook which lets backends get notified on memory changes, and converts kvm to use it. It survived light testing. Avi, could you please take a look at this patch? Thanks! --- cpu-common.h | 19 + exec.c | 62

[Qemu-devel] [PATCHv2 2/3] kvm: move kvm_set_phys_mem around

2010-01-05 Thread Michael S. Tsirkin
move kvm_set_phys_mem so that it will be later available earlier in the file. needed for next patch using memory notifiers. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- kvm-all.c | 276 ++-- 1 files changed, 138 insertions(+), 138

[Qemu-devel] Re: [PATCH V10 22/27] pci hotplug: add argument to pci hot plug callback.

2010-01-05 Thread Isaku Yamahata
On Mon, Jan 04, 2010 at 03:56:50PM +0100, Gerd Hoffmann wrote: On 12/24/09 09:09, Isaku Yamahata wrote: The argument will be used later to remove global variable. -static int piix4_device_hotplug(PCIDevice *dev, int state); +static int piix4_device_hotplug(void *opaque, PCIDevice *dev, int

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 08:53:52AM +1100, Benjamin Herrenschmidt wrote: Yes, but I think how you program your host to pci bridge is platform specific, the standard (mostly) applies to what happens below the bridge. There's no real standard for how PCI host bridge is connected to

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Benjamin Herrenschmidt
So, it appears that this is not the case for many platforms: bridge itself does a byteswap to make devices behind it work according to spec, but this does not apply to programming bridge itself. This seems common on BE platforms, this is why qemu has ifdef TARGET_WORDS_BIGENDIAN there

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 08:25:30AM +1100, Benjamin Herrenschmidt wrote: On Mon, 2010-01-04 at 23:12 +0200, Michael S. Tsirkin wrote: Well, the main issue if I understand correcttly is that basically the same hardware bridge can be connected to host in different ways. Yes, we can say if it's

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Alexander Graf
On 04.01.2010, at 23:59, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 09:51:48AM +1100, Benjamin Herrenschmidt wrote: On Tue, 2010-01-05 at 00:25 +0200, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 08:53:52AM +1100, Benjamin Herrenschmidt wrote: Yes, but I think how you program

[Qemu-devel] [PATCH 2/6] target-alpha: Split up FPCR value into separate fields.

2010-01-05 Thread Richard Henderson
The fpcr_exc_status, fpcr_exc_mask, and fpcr_dyn_round fields are stored in softfloat.h format for convenience during regular execution. Revert the addition of float_exception_mask to float_status, added in ba0e276db4b51bd2255a5d5ff8902c70d32ade40. Signed-off-by: Richard Henderson

Re: [Qemu-devel] [PATCH] Added 'access' option to -drive flag

2010-01-05 Thread Anthony Liguori
On 12/24/2009 03:09 AM, Markus Armbruster wrote: Naphtali Spreinsp...@redhat.com writes: Added 'access' option to -drive flag The new option is: access=[rw|ro|auto] rw: open the drive's file with Read and Write permission, don't continue if failed ro: open the file only with Read permission

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Anthony Liguori
On 12/23/2009 11:25 PM, Amit Shah wrote: On (Wed) Dec 23 2009 [17:12:22], Anthony Liguori wrote: +struct VirtIOSerial { +VirtIODevice vdev; + +VirtQueue *c_ivq, *c_ovq; +/* Arrays of ivqs and ovqs: one per port */ +VirtQueue **ivqs, **ovqs; + +VirtIOSerialBus *bus; + +

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Benjamin Herrenschmidt
On Mon, 2010-01-04 at 23:12 +0200, Michael S. Tsirkin wrote: Well, the main issue if I understand correcttly is that basically the same hardware bridge can be connected to host in different ways. Yes, we can say if it's connected differently it's a different device but this is slightly ugly,

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Benjamin Herrenschmidt
On Tue, 2010-01-05 at 00:08 +0100, Alexander Graf wrote: IIRC qemu's mmio functions just pass the register value the guest had at that moment to the mmio function. That means that qemu HW emulation needs, for each device, to add a layer of byteswap depending on whether the CPU is LE or BE

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Benjamin Herrenschmidt
Yes, but I think how you program your host to pci bridge is platform specific, the standard (mostly) applies to what happens below the bridge. There's no real standard for how PCI host bridge is connected to processor AFAIK, it's by luck we can share code there at all. Well, yes and no ...

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Benjamin Herrenschmidt
On Tue, 2010-01-05 at 00:25 +0200, Michael S. Tsirkin wrote: On Tue, Jan 05, 2010 at 08:53:52AM +1100, Benjamin Herrenschmidt wrote: Yes, but I think how you program your host to pci bridge is platform specific, the standard (mostly) applies to what happens below the bridge. There's

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Jamie Lokier
Avi Kivity wrote: On 01/05/2010 02:56 PM, Rusty Russell wrote: Those should be the same for any sane interface. They are for classical disk devices with larger block sizes (MO, s390 dasd) and also for the now appearing 4k sector scsi disks. But in the ide world people are concerned about

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Jamie Lokier
Avi Kivity wrote: Physical block size is the what the logical block size would have been is software didn't suck. In theory they should be the same, but since compatibility reaons clamp the logical block size to 512, they have to differ. A disk may have a physical block size of 4096 and

Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 07:10:58AM +1100, Benjamin Herrenschmidt wrote: On Mon, 2010-01-04 at 13:07 +0200, Michael S. Tsirkin wrote: BTW, I think we really should think about the right way to address the swap/noswap issue without using a preprocessor. Maybe make pci host bridge explicitly

  1   2   >