Re: [Qemu-devel] Re: [RFC PATCH 4/7] ide: IOMMU support

2010-07-14 Thread Paul Brook
On Wed, Jul 14, 2010 at 02:53:03PM +0100, Paul Brook wrote: Memory accesses must go through the IOMMU layer. No. Devices should not know or care whether an IOMMU is present. There are real devices that care very much about an IOMMU. Basically all devices supporting ATS care about

Re: [Qemu-devel] [RFC PATCH 2/7] AMD IOMMU emulation

2010-07-14 Thread Paul Brook
+ --enable-amd-iommu-emul) amd_iommu=yes +#ifdef CONFIG_AMD_IOMMU +amd_iommu_init(pci_bus); +#endif This should not be a configure option. Paul

Re: [Qemu-devel] Re: [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2010-07-04 Thread Paul Brook
Blue Swirl wrote: On Sat, Jul 3, 2010 at 7:39 AM, Jan Kiszka jan.kis...@web.de wrote: Paul Brook wrote: I really see no tangible objection to Jan's patches. They don't impact any other code. They don't inhibit flexibility in the infrastructure. You might consider it to be a hack

Re: [Qemu-devel] Re: [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2010-07-01 Thread Paul Brook
Since it solves existing problem and is rejected without any rational explanation and without proposing alternative solution (in form of code) it should be committed. No. This is not sufficient justification for applying a patch. We should not be accepting patches just because they exist. If

Re: [Qemu-devel] Re: [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2010-07-01 Thread Paul Brook
I really see no tangible objection to Jan's patches. They don't impact any other code. They don't inhibit flexibility in the infrastructure. You might consider it to be a hack but so what. QEMU is filled with hacks. It would be useless without them because there would be very little code.

[Qemu-devel] Re: [PATCH] ARM v4t/arm920t support

2010-07-01 Thread Paul Brook
Here is the patch again. There may be more work to be done on top of this, but this patch staying out of tree hasn't noticeably accelerated that work in the past year and change. Could it please be merged? As mentioned previously, V5 should be split into its component parts. Paul

Re: [Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable

2010-06-29 Thread Paul Brook
On 06/28/2010 10:29 PM, Paul Brook wrote: diff --git a/exec-all.h b/exec-all.h index a775582..ebe88ad 100644 --- a/exec-all.h +++ b/exec-all.h @@ -353,4 +353,8 @@ extern int singlestep; /* cpu-exec.c */ extern volatile sig_atomic_t exit_request; +#ifdef NEED_GLOBAL_ENV

[Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable

2010-06-29 Thread Paul Brook
On 06/29/2010 03:51 PM, Paolo Bonzini wrote: On 06/29/2010 01:30 PM, Paul Brook wrote: I don't understand what this is supposed to achieve. The inclusion of exec.h is what defines whether this global variable is available. Just as importantly, it also prevents code clobbering this value

Re: [Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable

2010-06-29 Thread Paul Brook
BTW, this may be useful for one thing: being able to include exec.h without bringing in the global variable. I'd argue that's not a desirable feature. I'd much rather have exec.h be the controlling factor than have all files include the same set of headers and have semantics

Re: [Qemu-devel] [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable

2010-06-28 Thread Paul Brook
diff --git a/exec-all.h b/exec-all.h index a775582..ebe88ad 100644 --- a/exec-all.h +++ b/exec-all.h @@ -353,4 +353,8 @@ extern int singlestep; /* cpu-exec.c */ extern volatile sig_atomic_t exit_request; +#ifdef NEED_GLOBAL_ENV +register CPUState *env asm(AREG0); +#endif Wouldn't it

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Paul Brook
So I've been looking for a way to obtain things like a PCIDevice from a more generic structure (say from hw/qdev.h), If you're having to figure out what kind of a device you have then I think you're already doing something else wrong. I'd expect the bits of code that needs to identify devices

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Paul Brook
Thanks for your reply. This isn't about a specific IOMMU. Let me describe the situation better: 1. I'm implementing the AMD IOMMU, which is a PCI IOMMU (not in the CPU). 2. Devices need address translation and checking through this IOMMU. 3. But in the future there might be other IOMMU

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Paul Brook
The user basically can specify two things: - a transport protocol. Normally this is just the filesystem interface, but it can also be nbd, http or for really sick people vvfat. This is a setting which can't be guessed, btw - it needs to be explicitly set in some way, with file

Re: [Qemu-devel] ARM/system mode/stdin

2010-06-18 Thread Paul Brook
$ qemu-system-arm -semihosting -cpu cortex-a9 -nographic -kernel ./input.exe -nographic implies -monitor stdio -serial stdio. Don't do that if you want to access stdio via semihosting. Paul

[Qemu-devel] Re: RFC qdev path semantics

2010-06-17 Thread Paul Brook
### Paul proposes to require all buses to define bus addresses. Make one up if necessary. That seems arbitrary and prone to breakage. How do we handle a subtle change in device instantiation order and still allow migration? If by code change or command line ordering my frobnitz

Re: RFC qdev path semantics (was: [Qemu-devel] [RFC PATCH 0/5] Introduce canonical device hierarchy string)

2010-06-16 Thread Paul Brook
* Else, use TYPE.NUM, where TYPE is derived from the bus type, and NUM is the bus number, as above. ### Paul proposes to either drop TYPE.NUM (and require drivers to provide bus names), or make NUM count separately for each bus type. I revised this proposal: Drop the .NUM part, and

[Qemu-devel] Re: RFC qdev path semantics

2010-06-16 Thread Paul Brook
Markus Armbruster wrote: A number of changes to qdev paths have been proposed in various threads. It's becoming harder to keep track of them, so let me sum them up in one place. Please correct me if I misrepresent your ideas. I'm going to describe the current state of things, and the

[Qemu-devel] [PATCH,APPLIED] Strace mprotect flags.

2010-06-16 Thread Paul Brook
Teach strace code about linux specific mprotect flags. Signed-off-by: Paul Brook p...@codesourcery.com --- linux-user/strace.c |3 +++ linux-user/syscall_defs.h |6 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index

[Qemu-devel] [PATCH,APPLIED] GDB exit status for semihosting

2010-06-16 Thread Paul Brook
Report exit status to GDB when a semihosted application exits. Signed-off-by: Paul Brook p...@codesourcery.com --- arm-semi.c |1 + gdbstub.c | 34 -- gdbstub.h |2 +- m68k-semi.c |1 + 4 files changed, 23 insertions(+), 15 deletions(-) diff

[Qemu-devel] [PATCH,APPLIED] Usermode exec-stack fix

2010-06-16 Thread Paul Brook
When loading a shared library that requires an executable stack, glibc uses the mprotext PROT_GROWSDOWN flag to achieve this. We don't support PROT_GROWSDOWN. Add a special case to handle changing the stack permissions in this way. Signed-off-by: Paul Brook p...@codesourcery.com --- linux-user

[Qemu-devel] Re: RFC qdev path semantics

2010-06-16 Thread Paul Brook
Bus names are chosen by the system as follows: * If the driver of the parent device model provides a name, use that. * Else, if the parent device has id ID, use ID.NUM, where NUM is the bus number, counting from zero in creation order. * Else, use TYPE.NUM, where TYPE is

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
In fact what you really want to do is transfer the device tree (including properties), and create the machine from scratch, not load state into a pre-supplied device tree. Well, I agree, but that's a lot more of an overhaul, and once again we're changing the problem. I think it's you

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
Alex proposed to disambiguate by adding identified properties of the immediate parent bus and device to the path component. For PCI, these are dev.fn. Likewise for any other bus where devices have unambigous bus address. The driver name carries no information! From user POV, driver

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
From user POV, driver names are very handly to address a device intuitively - except for the case you have tones of devices on the same bus that are handled by the same driver. For that case we need to augment the device name with a useful per-bus ID, derived from the bus address where

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
Paul Brook wrote: From user POV, driver names are very handly to address a device intuitively - except for the case you have tones of devices on the same bus that are handled by the same driver. For that case we need to augment the device name with a useful per-bus ID, derived from

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
Works for serial, but fails for ISA devices not occupying an address. An ISA device without an IO/MMIO capabilities seems extremely unlikely. What exactly would such a device do? Inject interrupts via that bus (while exposing registers in some other way). The m48t59 seems to fall in

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
Every hotplug-capable bus must have a proper addressing scheme, I think this is a reasonable and achievable requirement. Then we don't need instance numbers for those buses. What about USB? USB has useful device addresses (physical ports). These aren't used by most of the higher-level

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
Every hotplug-capable bus must have a proper addressing scheme, I think this is a reasonable and achievable requirement. Then we don't need instance numbers for those buses. What about USB? USB has useful device addresses (physical ports). These aren't used by most of the

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
On Tue, 2010-06-15 at 12:28 +0100, Paul Brook wrote: Alex proposed to disambiguate by adding identified properties of the immediate parent bus and device to the path component. For PCI, these are dev.fn. Likewise for any other bus where devices have unambigous bus address

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
I find this argument contradictory. The migration code already needs to check whether a device is compatible before it allows migration. The driver name is not sufficient to ensure compatibility, so I see no benefit in including it in the device address. See my comment above, I'm not

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
* Paul Brook (p...@codesourcery.com) wrote: I find this argument contradictory. The migration code already needs to check whether a device is compatible before it allows migration. The driver name is not sufficient to ensure compatibility, so I see no benefit in including

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-15 Thread Paul Brook
See my comment above, I'm not seeing a sufficient argument about why driver name matching is a false sense of security. I still say it should be the migration code that checks that both vmstate structures are for the same type of device. i.e. if necessary the device name

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-14 Thread Paul Brook
/main-system-bus/pci.0,addr=09.0/virtio-blk-pci There's a device missing between the main system bus and the pci bus. Should be something like: /main-system-bus/piix4-pcihost/pci.0/_09.0 Could you explain why you add identified properties of the immediate parent bus and device? They

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-14 Thread Paul Brook
On Mon, 2010-06-14 at 14:09 +0100, Paul Brook wrote: /main-system-bus/pci.0,addr=09.0/virtio-blk-pci There's a device missing between the main system bus and the pci bus. Should be something like: /main-system-bus/piix4-pcihost/pci.0/_09.0 Ok, I can easily come up

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-14 Thread Paul Brook
On Mon, 2010-06-14 at 18:49 +0200, Jan Kiszka wrote: Alex Williamson wrote: On Mon, 2010-06-14 at 18:00 +0200, Jan Kiszka wrote: And instead of introducing another hierarchy level with the bus address, I would also prefer to add this as prefix or suffix to the device name, e.g.

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-14 Thread Paul Brook
Ok, I can get it down to something like: /i440FX-pcihost/pci.0/virtio-blk-pci,09.0 The addr on the device is initially a little non-intuitive to me since it's a property of the bus, but I guess it make sense if we think of that level as slot, which includes an address and

Re: [Qemu-devel] [PATCH] Fix and simplify gui timer logic.

2010-06-14 Thread Paul Brook
This suggests we are incorrectly coalescing writes, and we should actually be notifying qemu when (at least) he first write occurs. If we aren't outputting anything we don't want to be waking up periodically just to flush an empty MMIO buffer. That is completely unrelated to

Re: [Qemu-devel] [PATCH v2 2/7] ioapic: convert to qdev

2010-06-14 Thread Paul Brook
-static void ioapic_reset(void *opaque) +static void ioapic_reset(DeviceState *d) { -IOAPICState *s = opaque; +IOAPICState *s = container_of(d, IOAPICState, busdev.qdev); DO_UPCAST()? I hate it, but it's what the other devices do... Both are used: grep container_of

Re: [Qemu-devel] Re: [SeaBIOS] [PATCHv2] load hpet info for HPET ACPI table from qemu

2010-06-14 Thread Paul Brook
Could we just have qemu build the hpet tables and pass them through to seabios? Perhaps using the qemu_cfg_acpi_additional_tables() method. Possible, and I considered that. I personally prefer to pass minimum information required for seabios to discover underlying HW and leave ACPI

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Paul Brook
I think we could solve all problems (well, maybe not world peace, yet) by switching to message based system for all of DMA and IRQs. Each device would have a message input port and way to output messages. Examples: Zero copy memory access from device D1 to D2 to host memory (D3) with

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Paul Brook
TBH I preferred the original system whereby the source can query the state of the sink (i.e are you ignoring this line?). Note that conceptually this should be *querying* state, not responding to an event. People are still pushing qemu_irq as an message passing interface, so I'm going to

[Qemu-devel] [PATCH,applied] Move stdbool.h

2010-06-13 Thread Paul Brook
Move inclusion of stdbool.h to common header files, instead of including in an ad-hoc manner. Signed-off-by: Paul Brook p...@codesourcery.com --- block/blkdebug.c |2 -- check-qjson.c|1 - dyngen-exec.h|1 + hw/9p.h |2 -- hw/eepro100.c

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Paul Brook
For the memory access case, in practice the interface could be sysbus_memory_rw(DeviceState *parent, target_phys_addr_t addr, target_phys_addr_t size) Why parent? Parent device or bus host bridge device. Alternatively there could be a bus handle. A device has no way of knowing

Re: [Qemu-devel] Re: [PATCH] pass info about hpets to seabios.

2010-06-13 Thread Paul Brook
And I think we can move the capability setup into init. But this is not directly related to this patch, would just avoid adding this hunk to hpet_reset. I actually did that initially and tried to init hpet_cfg there too, but then noticed that mmio[0].addr below is not initialized at init

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used to model message signaling interrupts, the latter to cleanly implement IRQ

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
On Sat, Jun 12, 2010 at 12:21 PM, Paul Brook p...@codesourcery.com wrote: This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
I think message passing interrupts are only used in bus based systems, like PCI or UPA/JBUS etc. I don't know how LAPIC/IOAPIC bus works, it could be similar. PCI Message Signalled Interrupts use a regular data write, and we model it exactly that way. Under normal circumstances you program

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
[*] A simple unidirectional dma request line is suitable for qmu_irq. A DMA system that transfers data outside of memory read/write transactions is not. e.g. ISA effectively defines a regular memory bus plus 8 bidirectional data streams (aka DMA channels). These are multiplexed over the

Re: [Qemu-devel] [PATCH] Name the default PCI bus pci.0 on all architectures

2010-06-11 Thread Paul Brook
Note that I *only* object to case 2 (derive bus name from parent device's ID). Case 3 (derive bus name from bus type) is fine with me. Using a single counter for all busses is also wrong. The order of bus creation is a device implementation detail, under no circumstances should it be

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-11 Thread Paul Brook
The trouble I'm running into is that the SaveStateEntry.instance_id is effectively private, and there's no easy way to associate a SaveStateEntry to a device since it passes an opaque pointer, which could be whatever the driver decides it wants. I'm wondering if we should pass the

[Qemu-devel] [PATCH, applied] NEON vldN optimization

2010-06-11 Thread Paul Brook
When combining multiple values as part of a NEON array load, do explcit shift/or rather than using gen_bfi. This voids redundant mask operations. Signed-off-by: Paul Brook p...@codesourcery.com --- target-arm/translate.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH, applied] NEON vldN optimization

2010-06-11 Thread Paul Brook
+tcg_gen_shli_i32(tmp2, tmp, 16); +tcg_gen_or_i32(tmp, tmp, tmp2); Which if you're paying attention is incorrect. Actual committed patch is correct - tcg_gen_shli_i32(tmp2, tmp2, 16); Paul

Re: [Qemu-devel] [PATCH 16/16] hpet: Add MSI support

2010-06-11 Thread Paul Brook
+} else if (timer_fsb_route(timer)) { +apic_send_msi(timer-fsb 32, timer-fsb 0x); This should use a regular memory write, like the PCI MSI-X code does. Paul

Re: [Qemu-devel] Disable PS/2 mouse

2010-06-10 Thread Paul Brook
For usb hid devices: No idea how they work and whenever we can put them into sleep somehow (with/without guest cooperation). The issue with USB is that it is (by design) a polled system. The UHCI adapter has to wakeup every 1ms to read transfer descriptors from guest RAM. Until recently there

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-10 Thread Paul Brook
On Thu, 2010-06-10 at 10:23 +0200, Gerd Hoffmann wrote: I may have been a bit misleading here. What we really want to do is use the same matching algorithm as is used by the rest of the device state. Currently this is a vmstate name and [arbitrary] numeric id. I don't remember whether

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-10 Thread Paul Brook
to the identify the device. It should probably do this the same way that we identify the saved state for the device. Currently I think this is an arbitrary vmstate name/id, but I expect this to change to a qdev address (e.g. /i440FX-pcihost/pci.0/_addr_04.0). Ok, that seems

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
Not all ram is associated with a device. Maybe not, but where it is we should be using that information. Absolute minimum we should be using the existing qdev address rather than inventing a new one. Duplicating this logic inside every device seems like a bad idea so I suggest

Re: [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
* Alex Williamson (alex.william...@redhat.com) wrote: +// XXX check duplicates Yes, definitely. You created a notion of a hierarchical namespace, can this be formalized any more? We already have one: The qdev tree. Paul

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
Keep in mind, this has to be a stable string across versions of qemu since this is savevm/migration. Are we absolutely confident that the full qdev path isn't going to change? I'm more confident that a unique device name is going to be static across qemu versions. The actual representation

Re: [Qemu-devel] Re: [PATCH 0/22] Refactor machine support

2010-06-09 Thread Paul Brook
Because at some point the base tree will have to be written in C. No. You can start with a completely empty machine. We don't/shouldn't need any machine specific C code. I think you're missing the argument. I should be possible to create a machine entirely from a FDT or via -device

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
Not really. This identifier is device and bus independent, which is why I suggested passing the device to qemu_ram_alloc. This can then figure out how to the identify the device. It should probably do this the same way that we identify the saved state for the device. Currently I think

Re: [Qemu-devel] Re: [PATCH 0/22] Refactor machine support

2010-06-08 Thread Paul Brook
I'm undecided how much parameterisation it's worth trying to support in the device tree. IMO the current code has way too much magic, because creating a new variant involves hacking and rebuilding pc.c. See patch 22/22. There is really no magic involved, even though the compat machines

Re: [Qemu-devel] [PATCH] configure: add an option to disable vlans

2010-06-08 Thread Paul Brook
I see three possible options to handle this. (1) Write a hub (or morph the current vlan code into this). Then you can do something like: qemu -netdev socket,id=p1 \ -netdev user,id=p2 \ -netdev dump,id=p3 \

Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice

2010-06-08 Thread Paul Brook
The problem I was trying to address can be seen with something like: -drive file=foo.img,if=virtio,file=bar.img You get no error, and foo.img is what gets used. It's fair to argue this is a silly use case but what I'm trying to achieve is to make it possible to do: -drive

Re: [Qemu-devel] Re: [PATCH 0/22] Refactor machine support

2010-06-08 Thread Paul Brook
Once you eliminate machine_register_core that knowledge has somehow got to come from your device tree description file. Having a single device tree that can morph into significantly different machines seems like unnecessary complexity given this is a user-specified file. 99% of

Re: [Qemu-devel] Re: [PATCH 0/22] Refactor machine support

2010-06-08 Thread Paul Brook
Once you eliminate machine_register_core that knowledge has somehow got to come from your device tree description file. Having a single device tree that can morph into significantly different machines seems like unnecessary complexity given this is a user-specified file. 99% of

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-08 Thread Paul Brook
The offset given to a block created via qemu_ram_alloc/map() is arbitrary, let the caller specify a name so we can make a positive match. @@ -1924,7 +1925,9 @@ static int pci_add_option_rom(PCIDevice *pdev) +snprintf(name, sizeof(name), pci:%02x.%x.rom, +

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-08 Thread Paul Brook
On 06/08/2010 09:30 PM, Paul Brook wrote: The offset given to a block created via qemu_ram_alloc/map() is arbitrary, let the caller specify a name so we can make a positive match. @@ -1924,7 +1925,9 @@ static int pci_add_option_rom(PCIDevice *pdev) +snprintf(name, sizeof(name

Re: [Qemu-devel] [PATCH] Fix and simplify gui timer logic.

2010-06-07 Thread Paul Brook
Kill nographic timer. Have a global gui_timer instead. Have the gui timer enabled unconditionally. We need a timer running anyway for mmio flush, so the whole have-gui-timer-only-when-needed logic is pretty pointless. It also simplifies displaylisteners coming and going at runtime, we

Re: [Qemu-devel] [PATCH] configure: add an option to disable vlans

2010-06-07 Thread Paul Brook
With -netdev, there now seems to be little need to support vlans, enabling them leads to user confusion and bad performance. Disable support for vlans by default, add config option to enable. No. If you want to remove vlans, then actually do that. As I've said before if you want a point-point

Re: [Qemu-devel] [PATCH] configure: add an option to disable vlans

2010-06-07 Thread Paul Brook
On Mon, Jun 07, 2010 at 05:16:30PM +0100, Paul Brook wrote: With -netdev, there now seems to be little need to support vlans, enabling them leads to user confusion and bad performance. Disable support for vlans by default, add config option to enable. No. If you want to remove vlans

Re: [Qemu-devel] [PATCH 15/22] machine: make max_cpus a -machine option

2010-06-07 Thread Paul Brook
diff --git a/hw/realview.c b/hw/realview.c index a36bdbe..8dcef80 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -444,9 +444,9 @@ static QEMUMachine realview_eb_mpcore_machine = { .init = realview_eb_mpcore_init, .opts_default = (QemuOptValue[]) {

Re: [Qemu-devel] [PATCH 0/22] Refactor machine support

2010-06-07 Thread Paul Brook
This series introduces a rather radical change in the way we deal with machine definitions in QEMU. I think we should aim to eliminate machine_register_core, and design appropriately. In particular I'd try and avoid adding options that become trivially redundant once you can easily change

Re: [Qemu-devel] [PATCH] qdev: Reject duplicate and anti-social device IDs

2010-06-04 Thread Paul Brook
Paul Brook p...@codesourcery.com writes: Also require IDs to start with a letter to provide for possible future extensions. I'd go further than that, and require that user specified IDs match [A-Za-z][A-Za-z0-9_-]* I talked with Dan (cc'ed) to make sure we don't trample on existing

Re: [Qemu-devel] [PATCH] qdev: Reject duplicate and anti-social device IDs

2010-06-03 Thread Paul Brook
Also require IDs to start with a letter to provide for possible future extensions. I'd go further than that, and require that user specified IDs match [A-Za-z][A-Za-z0-9_-]* Paul

Re: [Qemu-devel] Arm big endian?

2010-06-03 Thread Paul Brook
I'm trying to get arm big endian support to work. I patched the 2.6.33 kernel to pretend that good old versatilepb can have a big endian CPU plugged into it (attached), and then I built a kernel with the attached .config, and qemu went boing: That's about the result I'd expect. The fact that

Re: [Qemu-devel] Re: [PATCH v2 2/2] basic machine opts framework

2010-06-03 Thread Paul Brook
the irqchip option, if you note, is not x86-specific, in any case. Any machine has an irqchip. The first idea was to use something like apic=in_kernel|userspace which would be, that, very x86-centric. How is this not x86-pc specific? All you're doing is creating two different machines, one

Re: [Qemu-devel] [PATCH] Name the default PCI bus pci.0 on all architectures

2010-06-02 Thread Paul Brook
The problem is that the ID names of default devices in machines are ABI sensitive. Management apps need to know what the ID of these default devices are. The x86 machines have already used 'pci.0' as their name in the previous 0.12 release and libvirt is using this naming. We later discovered

Re: [Qemu-devel] [PATCH] Name the default PCI bus pci.0 on all architectures

2010-06-02 Thread Paul Brook
Paul Brook p...@codesourcery.com writes: The system emulators for each arch are using inconsistent naming for the default PCI bus pci vs pci.0. Since it is conceivable we'll have multiple PCI buses in the future standardize on pci.0 for all architectures. This ensures mgmt apps can rely

[Qemu-devel] Re: Unposted reserved_va patch

2010-06-02 Thread Paul Brook
Re: 68a1c816868b3e35a1da698af412b29e61b1948a In general, I like the idea (especially since I've proposed it before. ;-) However: +if (have_guest_base) { +flags |= MAP_FIXED; +} I think this is broken. If the user specifies -G n -R m they're hoping or

Re: [Qemu-devel] [PATCH] Name the default PCI bus pci.0 on all architectures

2010-06-02 Thread Paul Brook
Hi, I disagree. Anything that depends on device creation order is fundamentally broken. If you want to create globally unique user-friendly tags for devices or busses then that is a completely different problem, and should be done via explicit aliases. For anything created via

Re: [Qemu-devel] [PATCH 2/3] qemu-thread: add cleanup_push() and cleanup_pop()

2010-06-02 Thread Paul Brook
From pthread man: These functions manipulate the calling thread's stack of thread-cancellation clean-up handlers. A clean-up handler is a function that is automatically executed when a thread is canceled [...] it might, for example, unlock a mutex so that it becomes available to

Re: [Qemu-devel] [PATCH v3 02/17] qdev: Fix scanning across single-bus devices

2010-06-02 Thread Paul Brook
From: Jan Kiszka jan.kis...@siemens.com As long as we allow /dev.1 as shortcut for /dev1/bus1, we also have to make sure that /dev1/dev2 works for /dev1/bus1/dev2/bus2 - as long as there is only one child bus per device. How about we make this explicit in the syntax by having a different

Re: [Qemu-devel] [PATCH] Compile dma only once

2010-05-29 Thread Paul Brook
On Fri, May 28, 2010 at 7:34 PM, Paul Brook p...@codesourcery.com wrote: Use a qemu_irq to request CPU exit. Needing to request a CPU exit at all is just wrong. See previous discussions about how any use of qemu_bh_schedule_idle is fundamentally broken. I agree for the device case

Re: [Qemu-devel] [PATCH] all vga: refuse hotplugging.

2010-05-28 Thread Paul Brook
Try to pci hotplug a vga card, watch qemu die with hw_error(). This patch fixes it. I think this is wrong. There's no reason why VGA adapters shouldn't be hotplugged. You should fix the underlying problems that prevent hotplugging (or make them fail gracefully). Paul

Re: [Qemu-devel] hw/serial.c: Xmit fifo never used

2010-05-28 Thread Paul Brook
The problem is that this path is never used as tsr_retry is never 0 initially. So if qemu_chr_write() fails, we never try again but drop qemu_chr_write is a blocking interface. It should only fail if an unrecoverable error occurs. In that case there's noting useful we can do, and no reason

Re: [Qemu-devel] [PATCH] Compile dma only once

2010-05-28 Thread Paul Brook
Use a qemu_irq to request CPU exit. Needing to request a CPU exit at all is just wrong. See previous discussions about how any use of qemu_bh_schedule_idle is fundamentally broken. Paul

Re: [Qemu-devel] [PATCH] Name the default PCI bus pci.0 on all architectures

2010-05-28 Thread Paul Brook
The system emulators for each arch are using inconsistent naming for the default PCI bus pci vs pci.0. Since it is conceivable we'll have multiple PCI buses in the future standardize on pci.0 for all architectures. This ensures mgmt apps can rely on a name when assigning PCI devices an

Re: [Qemu-devel] [PATCH 0/2] [RFC] 64-bit io paths

2010-05-28 Thread Paul Brook
The basic device interface looks like ... + +/* Register a memory region at START_ADDR/SIZE. The REGION structure will + be initialized appropriately for DEV using CB as the operation set. */ +extern void cpu_register_memory_region(MemoryRegion *region, +

Re: [Qemu-devel] [PATCH 0/2] [RFC] 64-bit io paths

2010-05-28 Thread Paul Brook
[Hit send too early on previous mail...] The basic device interface looks like ... + +/* Register a memory region at START_ADDR/SIZE. The REGION structure will + be initialized appropriately for DEV using CB as the operation set. */ +extern void cpu_register_memory_region(MemoryRegion

Re: [Qemu-devel] Re: [RFT][PATCH 07/15] qemu_irq: Add IRQ handlers with delivery feedback

2010-05-27 Thread Paul Brook
In some cases we don't even do that, and just reschedule the event some arbitrarily small amount of time later. This assumes the guest to do useful work in that time. In a single threaded environment this is probably true - qemu got enough CPU to inject the first interrupt, so will

Re: [Qemu-devel] Re: [RFT][PATCH 07/15] qemu_irq: Add IRQ handlers with delivery feedback

2010-05-27 Thread Paul Brook
Then the amount of CPU cycles between timer interrupts would increase and hopefully the guest can keep up. If the guest sleeps, time base could be accelerated to catch up with wall clock and then set back to 1:1 rate. Can't follow you ATM, sorry. What should be slowed down then? And

Re: [Qemu-devel] Re: [RFT][PATCH 07/15] qemu_irq: Add IRQ handlers with delivery feedback

2010-05-26 Thread Paul Brook
At the other extreme, would it be possible to make the educated guests aware of the virtualization also in clock aspect: virtio-clock? The guest doesn't even need to be aware of virtualization. It just needs to be able to accommodate the lack of guaranteed realtime behavior. The fundamental

Re: [Qemu-devel] [RFT][PATCH 09/15] hpet/rtc: Rework RTC IRQ replacement by HPET

2010-05-25 Thread Paul Brook
for (i = 0; i 24; i++) { sysbus_connect_irq(sysbus_from_qdev(hpet), i, isa_irq[i]); } +rtc_irq = qemu_allocate_feedback_irqs(hpet_handle_rtc_irq, + sysbus_from_qdev(hpet), 1); } This is wrong. The hpet

Re: [Qemu-devel] [RFT][PATCH 05/15] hpet: Convert to qdev

2010-05-25 Thread Paul Brook
+static SysBusDeviceInfo hpet_device_info = { +.qdev.name= hpet, +.qdev.size= sizeof(HPETState), +.qdev.no_user = 1, Why shouldn't the user create HPET devices? I thought you'd removed all the global state. Paul

Re: [Qemu-devel] [RFT][PATCH 09/15] hpet/rtc: Rework RTC IRQ replacement by HPET

2010-05-25 Thread Paul Brook
This is wrong. The hpet device should expose this as an IO pin. Will look into this. BTW, I just realized that the GPIO handling is apparently lacking support for attaching an output to multiple inputs. Or am I missing something? Use an explicit mux. Incidentally I suspect your

Re: [Qemu-devel] [RFT][PATCH 09/15] hpet/rtc: Rework RTC IRQ replacement by HPET

2010-05-25 Thread Paul Brook
Paul Brook wrote: This is wrong. The hpet device should expose this as an IO pin. Will look into this. BTW, I just realized that the GPIO handling is apparently lacking support for attaching an output to multiple inputs. Or am I missing something? Use an explicit mux

Re: [Qemu-devel] [RFT][PATCH 09/15] hpet/rtc: Rework RTC IRQ replacement by HPET

2010-05-25 Thread Paul Brook
I realise that. However I'd expect things to break if the guest OS devices to share an IRQ line between the HPET and some other device. The guest would share IRQ8, not the RTC output. So there would be no difference to the current situation. The difference is that you've removed the check

Re: [Qemu-devel] [PATCH 1/2] ioport: add function to check whenever a port is assigned or not

2010-05-24 Thread Paul Brook
+int is_ioport_assigned(pio_addr_t addr) Shouldn't we move this into register_ioport_{read,write}, and have that fail if the port has already been assigned? Paul

[Qemu-devel] Re: [PATCH 0/6] Make hpet a compile time option

2010-05-24 Thread Paul Brook
Notice that this patch was sent against hpet as one example, if we agree that this way of disabling devices is ok, we could disable more devices/have more flexibility. Notice that in general, we (RHEL/KVM) are interested in a small subset of qemu devices. IMO this patch is a backwards step.

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