* [Qemu-devel] [PATCH 1/7] usb: Clean common object and dependency files
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 2/7] qom: Clean libuser " Stefan Hajnoczi
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Jan Kiszka, qemu-devel, Stefan Hajnoczi
From: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 621cb86..d872d46 100644
--- a/Makefile
+++ b/Makefile
@@ -216,7 +216,7 @@ clean:
rm -Rf .libs
rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d
rm -f qom/*.o qom/*.d
- rm -f usb/*.o usb/*.d hw/*.o hw/*.d
+ rm -f hw/usb/*.o hw/usb/*.d hw/*.o hw/*.d
rm -f qemu-img-cmds.h
rm -f trace/*.o trace/*.d
rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 2/7] qom: Clean libuser object and dependency files
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 1/7] usb: Clean common object and dependency files Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 3/7] remove unused include of error.h Stefan Hajnoczi
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Jan Kiszka, qemu-devel, Stefan Hajnoczi
From: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index d872d46..000b46c 100644
--- a/Makefile
+++ b/Makefile
@@ -215,7 +215,7 @@ clean:
rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
rm -Rf .libs
rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d
- rm -f qom/*.o qom/*.d
+ rm -f qom/*.o qom/*.d libuser/qom/*.o libuser/qom/*.d
rm -f hw/usb/*.o hw/usb/*.d hw/*.o hw/*.d
rm -f qemu-img-cmds.h
rm -f trace/*.o trace/*.d
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 3/7] remove unused include of error.h
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 1/7] usb: Clean common object and dependency files Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 2/7] qom: Clean libuser " Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 13:00 ` Luiz Capitulino
2012-08-03 10:51 ` [Qemu-devel] [PATCH 4/7] socket: clean up redundant assignment Stefan Hajnoczi
` (4 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amos Kong, qemu-devel, Stefan Hajnoczi
From: Amos Kong <akong@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
qemu_socket.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/qemu_socket.h b/qemu_socket.h
index 4689ff3..1a2f517 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -27,7 +27,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
#endif /* !_WIN32 */
#include "qemu-option.h"
-#include "error.h"
#include "qerror.h"
/* misc helpers */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 3/7] remove unused include of error.h
2012-08-03 10:51 ` [Qemu-devel] [PATCH 3/7] remove unused include of error.h Stefan Hajnoczi
@ 2012-08-03 13:00 ` Luiz Capitulino
2012-08-03 13:24 ` Stefan Hajnoczi
0 siblings, 1 reply; 12+ messages in thread
From: Luiz Capitulino @ 2012-08-03 13:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Anthony Liguori, Amos Kong, qemu-devel
On Fri, 3 Aug 2012 11:51:02 +0100
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> wrote:
> From: Amos Kong <akong@redhat.com>
>
> Signed-off-by: Amos Kong <akong@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
> qemu_socket.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/qemu_socket.h b/qemu_socket.h
> index 4689ff3..1a2f517 100644
> --- a/qemu_socket.h
> +++ b/qemu_socket.h
> @@ -27,7 +27,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
> #endif /* !_WIN32 */
>
> #include "qemu-option.h"
> -#include "error.h"
> #include "qerror.h"
nack on this one, as it's dropping the wrong file.
qemu_socket.h declares functions that take an Error argument, so it has
to include error.h.
However, qerror.h should be dropped and any build breakage should be
fixed by including qerror.h in the .c files it's missing.
>
> /* misc helpers */
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 3/7] remove unused include of error.h
2012-08-03 13:00 ` Luiz Capitulino
@ 2012-08-03 13:24 ` Stefan Hajnoczi
0 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 13:24 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: Anthony Liguori, Amos Kong, Stefan Hajnoczi, qemu-devel
On Fri, Aug 3, 2012 at 2:00 PM, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> On Fri, 3 Aug 2012 11:51:02 +0100
> Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> wrote:
>
>> From: Amos Kong <akong@redhat.com>
>>
>> Signed-off-by: Amos Kong <akong@redhat.com>
>> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
>> ---
>> qemu_socket.h | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/qemu_socket.h b/qemu_socket.h
>> index 4689ff3..1a2f517 100644
>> --- a/qemu_socket.h
>> +++ b/qemu_socket.h
>> @@ -27,7 +27,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
>> #endif /* !_WIN32 */
>>
>> #include "qemu-option.h"
>> -#include "error.h"
>> #include "qerror.h"
>
> nack on this one, as it's dropping the wrong file.
>
> qemu_socket.h declares functions that take an Error argument, so it has
> to include error.h.
>
> However, qerror.h should be dropped and any build breakage should be
> fixed by including qerror.h in the .c files it's missing.
Okay, let's drop this patch. I build tested it across all targets, so
at least it doesn't break anything.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 4/7] socket: clean up redundant assignment
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
` (2 preceding siblings ...)
2012-08-03 10:51 ` [Qemu-devel] [PATCH 3/7] remove unused include of error.h Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 5/7] exec.c: Fix off-by-one error in register_subpage Stefan Hajnoczi
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amos Kong, qemu-devel, Stefan Hajnoczi
From: Amos Kong <akong@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
qemu-sockets.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/qemu-sockets.c b/qemu-sockets.c
index 668fa93..beb2bb6 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -284,7 +284,6 @@ int inet_connect_opts(QemuOpts *opts, Error **errp)
inet_strfamily(e->ai_family),
e->ai_canonname, uaddr, uport, strerror(errno));
closesocket(sock);
- sock = -1;
continue;
}
freeaddrinfo(res);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 5/7] exec.c: Fix off-by-one error in register_subpage
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
` (3 preceding siblings ...)
2012-08-03 10:51 ` [Qemu-devel] [PATCH 4/7] socket: clean up redundant assignment Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 6/7] exec.c: Use subpages for large unaligned mappings Stefan Hajnoczi
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Stefan Hajnoczi, Tyler Hall
From: Tyler Hall <tylerwhall@gmail.com>
subpage_register() expects "end" to be the last byte in the mapping.
Registering a non-page-aligned memory region that extends up to or
beyond a page boundary causes subpage_register() to silently fail
through the (end >= PAGE_SIZE) check.
This bug does not cause noticeable problems for mappings that do not
extend to a page boundary, though they do register an extra byte.
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec.c b/exec.c
index feb4795..27b100c 100644
--- a/exec.c
+++ b/exec.c
@@ -2271,7 +2271,7 @@ static void register_subpage(MemoryRegionSection *section)
subpage = container_of(existing->mr, subpage_t, iomem);
}
start = section->offset_within_address_space & ~TARGET_PAGE_MASK;
- end = start + section->size;
+ end = start + section->size - 1;
subpage_register(subpage, start, end, phys_section_add(section));
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 6/7] exec.c: Use subpages for large unaligned mappings
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
` (4 preceding siblings ...)
2012-08-03 10:51 ` [Qemu-devel] [PATCH 5/7] exec.c: Fix off-by-one error in register_subpage Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 10:51 ` [Qemu-devel] [PATCH 7/7] exec.c: Remove out of date comment Stefan Hajnoczi
2012-08-03 13:27 ` [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
7 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Stefan Hajnoczi, Tyler Hall
From: Tyler Hall <tylerwhall@gmail.com>
Registering a multi-page memory region that is non-page-aligned results
in a subpage from the start to the page boundary, some number of full
pages, and possibly another subpage from the last page boundary to the
end. The full pages will have a value for offset_within_region that is
not a multiple of TARGET_PAGE_SIZE. Accesses through softmmu are unable
to handle this and will segfault.
Handling full pages through subpages is not optimal, but only
non-page-aligned mappings take the penalty.
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
exec.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index 27b100c..e6ac3e7 100644
--- a/exec.c
+++ b/exec.c
@@ -2305,10 +2305,15 @@ void cpu_register_physical_memory_log(MemoryRegionSection *section,
remain.offset_within_address_space += now.size;
remain.offset_within_region += now.size;
}
- now = remain;
- now.size &= TARGET_PAGE_MASK;
- if (now.size) {
- register_multipage(&now);
+ while (remain.size >= TARGET_PAGE_SIZE) {
+ now = remain;
+ if (remain.offset_within_region & ~TARGET_PAGE_MASK) {
+ now.size = TARGET_PAGE_SIZE;
+ register_subpage(&now);
+ } else {
+ now.size &= TARGET_PAGE_MASK;
+ register_multipage(&now);
+ }
remain.size -= now.size;
remain.offset_within_address_space += now.size;
remain.offset_within_region += now.size;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 7/7] exec.c: Remove out of date comment
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
` (5 preceding siblings ...)
2012-08-03 10:51 ` [Qemu-devel] [PATCH 6/7] exec.c: Use subpages for large unaligned mappings Stefan Hajnoczi
@ 2012-08-03 10:51 ` Stefan Hajnoczi
2012-08-03 13:27 ` [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
7 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 10:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Peter Maydell, qemu-devel, Stefan Hajnoczi
From: Peter Maydell <peter.maydell@linaro.org>
Remove an out of date comment: this comment used to be attached to
cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally
inserted a couple of other functions between the comment and its function.
It is in any case obsolete since (a) the function arguments it refers
to have been replaced with a single MemoryRegionSection* argument and
(b) the inability to handle regions whose offset_within_address_space
and offset_within_region aren't equally aligned was fixed as part of
the rewrite of this code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
exec.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/exec.c b/exec.c
index e6ac3e7..a42a0b5 100644
--- a/exec.c
+++ b/exec.c
@@ -2240,14 +2240,6 @@ static void phys_sections_clear(void)
phys_sections_nb = 0;
}
-/* register physical memory.
- For RAM, 'size' must be a multiple of the target page size.
- If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an
- io memory page. The address used when calling the IO function is
- the offset from the start of the region, plus region_offset. Both
- start_addr and region_offset are rounded down to a page boundary
- before calculating this offset. This should not be a problem unless
- the low bits of start_addr and region_offset differ. */
static void register_subpage(MemoryRegionSection *section)
{
subpage_t *subpage;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012
2012-08-03 10:50 [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
` (6 preceding siblings ...)
2012-08-03 10:51 ` [Qemu-devel] [PATCH 7/7] exec.c: Remove out of date comment Stefan Hajnoczi
@ 2012-08-03 13:27 ` Stefan Hajnoczi
2012-08-03 20:43 ` Anthony Liguori
7 siblings, 1 reply; 12+ messages in thread
From: Stefan Hajnoczi @ 2012-08-03 13:27 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Anthony Liguori, qemu-devel
On Fri, Aug 3, 2012 at 11:50 AM, Stefan Hajnoczi
<stefanha@linux.vnet.ibm.com> wrote:
> This pull request subsumes the currently pending request from 1 August.
> Patches from Amos Kong, Peter Cong, and Tyler Hall have been added.
>
> The following changes since commit 02d2bd5d57812154cfb978bc2098cf49d551583d:
>
> Replace 'struct siginfo' with 'siginfo_t'. (2012-08-01 08:54:07 -0500)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git trivial-patches
>
> for you to fetch changes up to 48110429ef7a4ecb1665e88ce58ba2ebd9664e4f:
>
> exec.c: Remove out of date comment (2012-08-03 10:56:07 +0100)
Luiz pointed out an issue with Amos' #include "error.h" removal patch.
I have dropped it and the new HEAD is at
c308efe63a875eb0d839f7490e69e58e4595466c.
Thanks,
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012
2012-08-03 13:27 ` [Qemu-devel] [PULL 0/7] Trivial patches for 22 July to 3 August 2012 Stefan Hajnoczi
@ 2012-08-03 20:43 ` Anthony Liguori
0 siblings, 0 replies; 12+ messages in thread
From: Anthony Liguori @ 2012-08-03 20:43 UTC (permalink / raw)
To: Stefan Hajnoczi, Stefan Hajnoczi; +Cc: qemu-devel
Stefan Hajnoczi <stefanha@gmail.com> writes:
> On Fri, Aug 3, 2012 at 11:50 AM, Stefan Hajnoczi
> <stefanha@linux.vnet.ibm.com> wrote:
>> This pull request subsumes the currently pending request from 1 August.
>> Patches from Amos Kong, Peter Cong, and Tyler Hall have been added.
>>
>> The following changes since commit 02d2bd5d57812154cfb978bc2098cf49d551583d:
>>
>> Replace 'struct siginfo' with 'siginfo_t'. (2012-08-01 08:54:07 -0500)
>>
>> are available in the git repository at:
>>
>> git://github.com/stefanha/qemu.git trivial-patches
>>
>> for you to fetch changes up to 48110429ef7a4ecb1665e88ce58ba2ebd9664e4f:
>>
>> exec.c: Remove out of date comment (2012-08-03 10:56:07 +0100)
>
> Luiz pointed out an issue with Amos' #include "error.h" removal patch.
> I have dropped it and the new HEAD is at
> c308efe63a875eb0d839f7490e69e58e4595466c.
>
Pulled. Thanks.
Regards,
Anthony Liguori
> Thanks,
> Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread