Re: [Qemu-devel] [PATCH 2/7] tcg: Optimize add2 + sub2

2012-09-30 Thread Blue Swirl
On Thu, Sep 27, 2012 at 5:19 PM, Richard Henderson r...@twiddle.net wrote: We can't do complete constant folding because we lack mov2, or the ability to insert opcodes in the stream. But we can at least canonicalize add2 operand ordering and simplify add2 to add when the lowpart adds a

Re: [Qemu-devel] instruction execution permission

2012-09-30 Thread Blue Swirl
On Sun, Sep 30, 2012 at 4:06 AM, Xin Tong xerox.time.t...@gmail.com wrote: In QEMU x86, is a basicblock is translated with CPL of 0, can the translation block be executed in CPL of 3 ? TB flags are defined by cpu_get_tb_cpu_state(), you can find the x86 version in target-i386/cpu.h. Xin

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-30 Thread Avi Kivity
On 09/29/2012 11:20 AM, liu ping fan wrote: Do we have iommus in qemu now, We do, but they're hacked into the scsi layer, see hw/sun4m_iommu.c. I don't know if it's a standalone iommu on real hardware or whether it is part of the HBA. since there are no separate phys_maps for real address

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-30 Thread liu ping fan
On Sun, Sep 30, 2012 at 4:13 PM, Avi Kivity a...@redhat.com wrote: On 09/29/2012 11:20 AM, liu ping fan wrote: Do we have iommus in qemu now, We do, but they're hacked into the scsi layer, see hw/sun4m_iommu.c. I don't know if it's a standalone iommu on real hardware or whether it is part

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-30 Thread Blue Swirl
On Sun, Sep 30, 2012 at 8:13 AM, Avi Kivity a...@redhat.com wrote: On 09/29/2012 11:20 AM, liu ping fan wrote: Do we have iommus in qemu now, We do, but they're hacked into the scsi layer, see hw/sun4m_iommu.c. I don't know if it's a standalone iommu on real hardware or whether it is part

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-30 Thread Avi Kivity
On 09/30/2012 01:04 PM, Blue Swirl wrote: On Sun, Sep 30, 2012 at 8:13 AM, Avi Kivity a...@redhat.com wrote: On 09/29/2012 11:20 AM, liu ping fan wrote: Do we have iommus in qemu now, We do, but they're hacked into the scsi layer, see hw/sun4m_iommu.c. I don't know if it's a standalone

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-30 Thread Avi Kivity
On 09/30/2012 10:48 AM, liu ping fan wrote: On Sun, Sep 30, 2012 at 4:13 PM, Avi Kivity a...@redhat.com wrote: On 09/29/2012 11:20 AM, liu ping fan wrote: Do we have iommus in qemu now, We do, but they're hacked into the scsi layer, see hw/sun4m_iommu.c. I don't know if it's a standalone

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-30 Thread Blue Swirl
On Sun, Sep 30, 2012 at 11:17 AM, Avi Kivity a...@redhat.com wrote: On 09/30/2012 01:04 PM, Blue Swirl wrote: On Sun, Sep 30, 2012 at 8:13 AM, Avi Kivity a...@redhat.com wrote: On 09/29/2012 11:20 AM, liu ping fan wrote: Do we have iommus in qemu now, We do, but they're hacked into the scsi

Re: [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into set of stringified properties

2012-09-30 Thread Blue Swirl
On Wed, Sep 26, 2012 at 8:32 PM, Igor Mammedov imamm...@redhat.com wrote: cpu_model string does represent features in following format: ([+-]feat)|(feat=foo)|(feat) which makes it impossible directly use property infrastructure to set features on CPU. This patch introduces parser that splits

Re: [Qemu-devel] [PATCH 0/5] i386: cpu: remove duplicate feature names

2012-09-30 Thread Blue Swirl
On Thu, Sep 6, 2012 at 8:05 PM, Eduardo Habkost ehabk...@redhat.com wrote: The problem: - Some features are report at the same time on both CPUID[1].EDX and CPUID[8000_0001].EDX on AMD CPUs (e.g. fpu, tsc, msr, pae, mmx). - -cpu model,+feature should enable the bit only on CPUID[1] if

Re: [Qemu-devel] [PATCH] esp: On qemu-system-sparc's esp, TC is not set properly

2012-09-30 Thread Blue Swirl
On Tue, Sep 25, 2012 at 6:15 PM, Ryo ONODERA ryo...@yk.rim.or.jp wrote: Hi, From: Ryo ONODERA ryo...@yk.rim.or.jp, Date: Wed, 26 Sep 2012 02:44:35 +0900 I does not understand hw/esp.c fully. This patch supresses esp/TC related errors on NetBSD/sparc 5.1.2 or 6.0_RC2. Please review the

[Qemu-devel] pwrite64 error because of argument position

2012-09-30 Thread Alex Barcelo
This error may be a PPC specific problem, but I don't have another environment where I can test it (i386 doesn't seem to use pwrite64), so I ask for a bit of help/check. I am in a 32bit linux testing the qemu-ppc. My test program: // --- #include unistd.h #include

Re: [Qemu-devel] [PATCH 1/1] kvmclock: fix guest stop notification

2012-09-30 Thread Marcelo Tosatti
On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote: On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote: Commit f349c12c0434e29c79ecde89029320c4002f7253 added the guest stop notification, but it did it in a way that the stop notification would never reach the kernel. The

Re: [Qemu-devel] [PATCH 1/1] kvmclock: fix guest stop notification

2012-09-30 Thread Amos Kong
- Original Message - On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote: On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote: Commit f349c12c0434e29c79ecde89029320c4002f7253 added the guest stop In commitlog of f349c12c0434e29c79ecde89029320c4002f7253: ##

[Qemu-devel] List of Virtualized IO devices - QEMU

2012-09-30 Thread Krishna Kumaar Natarajan
Where can I find the list of IO devices virtualized for QEMU ? -- Regards, Krishna Kumaar N.I.

[Qemu-devel] [PATCH v6 2/8] vl: fix -hdachs/-hda argument order parsing issues

2012-09-30 Thread Matthew Ogilvie
Without this patch, the -hdachs argument had to occur either BEFORE the corresponding -hda option, or AFTER the plain disk image name (if neither -hda nor -drive is used). Otherwise it would effectively be ignored. Option -hdachs still has no effect on -drive, but that seems best.

[Qemu-devel] [PATCH v6 4/8] vga: add some optional CGA compatibility hacks

2012-09-30 Thread Matthew Ogilvie
This patch adds some optional compatibility hacks (default disabled) to allow Microport UNIX to function under qemu. I've tried to structure it to be easy to add more hacks for other old CGA programs, if anyone ever needs them. Microport UNIX System V/386 v 2.1 (ca 1987) tries to program the CGA

[Qemu-devel] [PATCH v6 1/8] fix some debug printf format strings

2012-09-30 Thread Matthew Ogilvie
These are normally ifdefed out and don't matter. But if you enable them, they ought to be correct. Signed-off-by: Matthew Ogilvie mmogilvi_q...@miniinfo.net --- hw/cirrus_vga.c | 4 ++-- hw/i8259.c | 3 ++- hw/ide/cmd646.c | 5 +++-- hw/ide/via.c| 5 +++-- 4 files changed, 10

[Qemu-devel] [PATCH v6 6/8] i8259: fix so that dropping IRQ level always clears the interrupt request

2012-09-30 Thread Matthew Ogilvie
Intel's definition of edge triggered means: asserted with a low-to-high transition at the time an interrupt is registered and then kept high until the interrupt is served via one of the EOI mechanisms or goes away unhandled. So the only difference between edge triggered and level triggered is in

[Qemu-devel] [PATCH v6 5/8] i8254: fix inaccuracies in pit_get_out()

2012-09-30 Thread Matthew Ogilvie
* Fix high-vs-low counting logic to match the timing diagrams and descriptions in Intel's documentation (23124406.pdf). * Improve reading back the count in mode 3. * Handle GATE input properly with respect to the OUT line, and add a FIXME comment for reading back the counter.

[Qemu-devel] [PATCH v6 7/8] i8259: refactor pic_set_irq level logic

2012-09-30 Thread Matthew Ogilvie
No change in functionality. Clarify that the only difference between level triggered and edge triggered interrupts is on the leading edge. Signed-off-by: Matthew Ogilvie mmogilvi_q...@miniinfo.net --- hw/i8259.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-)

[Qemu-devel] [PATCH v6 0/8] i8254, i8259 and running Microport UNIX (ca 1987)

2012-09-30 Thread Matthew Ogilvie
Changes since previous version: * Patches 1, 2, 3, and 4, and 7 haven't changed at all. * The only change to patch 6 is I added test cases output to the commit message. * Patches 5 and 8 are new. Patch 8 has downsides; see migration notes below. Disclaimer: The PIT patches and

[Qemu-devel] [PATCH v6 3/8] qemu-options.hx: mention retrace= VGA option

2012-09-30 Thread Matthew Ogilvie
The feature was added in commit cb5a7aa8c32141bb Sep 2008. My description is based on Better VGA retrace emulation (needed for some DOS games/demos) from http://www.boblycat.org/~malc/code/patches/qemu/index.html Signed-off-by: Matthew Ogilvie mmogilvi_q...@miniinfo.net --- qemu-options.hx | 8

[Qemu-devel] [PATCH v6 8/8] i8259/i8254: migration workaround for timer

2012-09-30 Thread Matthew Ogilvie
Signed-off-by: Matthew Ogilvie mmogilvi_q...@miniinfo.net --- It is not at all clear that this is the best way to handle this. See the detailed notes in the cover letter of this patch series. UPDATE: Also, some fixes moved the leading edge by 1 CLK tick (CLK ticks at about 1.1 MHz), and some