Reformat the option parsing code in main() and various supporting functions
to conform to the QEMU coding style.
Signed-off-by: Jesse Larrew
---
vl.c | 476 +--
1 file changed, 260 insertions(+), 216 deletions(-)
diff --git a
On 01/25/2013 04:11 AM, Andreas Färber wrote:
> Am 25.01.2013 10:56, schrieb Alexander Graf:
>>
>> Am 25.01.2013 um 10:47 schrieb Andreas Färber :
>>
>>> Am 25.01.2013 00:04, schrieb Jesse Larrew:
>>>>
>>>> Reformat the option parsing code in m
** Changed in: qemu
Assignee: (unassigned) => Jesse Larrew (jlarrew)
** Changed in: qemu
Status: New => In Progress
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/659351
Title:
The new multiqueue feature adds fields to the virtio device config, which
breaks Windows guests. Disable the feature by default until the Windows
drivers are fixed.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio
set of features enabled.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 44
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index f1c2884..2956bc1 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
This patch set fixes an issue with virtio Windows drivers when multiqueue
is enabled. This is a narrow fix for 1.4, and I intend to generalize the
approach for all virtio devices in 1.5.
From: Anthony Liguori
Signed-off-by: Anthony Liguori
---
hw/s390x/s390-virtio-bus.c | 3 ++-
hw/s390x/virtio-ccw.c | 3 ++-
hw/virtio-net.c| 3 ++-
hw/virtio-pci.c| 3 ++-
hw/virtio.h| 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --
This patch set fixes an issue with virtio Windows drivers when multiqueue
is enabled. This is a narrow fix for 1.4, and I intend to generalize the
approach for all virtio devices in 1.5.
Changes since V1:
* Added missing parentheses around the endof() macro definition.
* Fixed spelling errors in t
From: Anthony Liguori
Signed-off-by: Anthony Liguori
---
hw/s390x/s390-virtio-bus.c | 3 ++-
hw/s390x/virtio-ccw.c | 3 ++-
hw/virtio-net.c| 3 ++-
hw/virtio-pci.c| 3 ++-
hw/virtio.h| 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --
The new multiqueue feature adds fields to the virtio device config, which
breaks Windows guests. Disable the feature by default until the Windows
drivers are fixed.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio
set of features enabled.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 44
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index f1c2884..8f521b3 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
Clarify the definition of endof() by using the offsetof() and sizeof()
macros to handle the pointer magic.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 8f521b3..663f33c 100644
--- a/hw
Since the new config_size member of struct VirtIONet specifies a size, it
should be declared as size_t.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 663f33c..573c669 100644
--- a/hw
This patch set includes some minor cleanups requested by the community for
the virtio-net config size solution.
[PATCH 1/2] hw/virtio-net: use existing macros to implement endof
[PATCH 2/2] hw/virtio-net: fix config_size data type
len instead.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 573c669..bdbfc18 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -73,7 +73,6 @@ typedef struct VirtIONet
Fill in the feature table with the last field of struct virtio_blk_config
at the time that the feature flag was introduced. The table was constructed
by searching through the git history.
Signed-off-by: Jesse Larrew
---
hw/virtio-blk.c | 22 --
1 file changed, 20 insertions
table that uses the full size of the
config struct. These dummy tables will be replaced on a per-driver basis.
Signed-off-by: Jesse Larrew
---
hw/9pfs/virtio-9p-device.c | 15 ++-
hw/virtio-balloon.c| 15 ---
hw/virtio-blk.c| 14 +++---
hw/virtio
There are two feature bits for virtio-balloon:
VIRTIO_BALLOON_F_MUST_TELL_HOST, and
VIRTIO_BALLOON_F_STATS_VQ.
Since these features don't require additional fields in the config struct,
set the 'end' field to the end of the last field in the struct.
Signed-off-by: Jesse
Drivers affected:
* virtio_balloon
* virtio_serial_bus
* virtio_scsi
* virtio_blk
* virtio_9p
* virtio_rng
Signed-off-by: Jesse Larrew
---
hw/s390x/s390-virtio-bus.c | 7 ---
hw/s390x/virtio-ccw.c | 11 +++
hw/virtio-balloon.c| 2 +-
hw/virtio-blk.c
Move the definition of struct VirtIOFeature from virtio-net.c to virtio.h
so other virtio devices can benefit.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 12
hw/virtio.h | 12
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/virtio-net.c b
Since none of the existing feature bits changed the layout of struct
VirtIOSCSIConf, set the minimum struct size to use the full struct (i.e
endof(struct VirtIOSCSIConf, cmd_per_lun)).
Signed-off-by: Jesse Larrew
---
hw/virtio-scsi.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions
VIRTIO_CONSOLE_F_MULTIPORT is set when max_nr_ports > 1, so set the config
size to include max_nr_ports.
Signed-off-by: Jesse Larrew
---
hw/virtio-serial-bus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 9cd9
To ensure compatibility between qemu versions, virtio drivers should set
the size of their config structs according to the feature bits that are
set. This should keep the size from changing as new features are introduced
and avoid breaking older drivers.
[PATCH 1/8] virtio-net: replace redundant c
To ensure compatibility between qemu versions, virtio drivers should set
the size of their config structs according to the feature bits that are
set. This should keep the size from changing as new features are introduced
and avoid breaking older drivers.
Changes since v1:
* Fixed a build error on
Fill in the feature table with the last field of struct virtio_blk_config
at the time that the feature flag was introduced. The table was constructed
by searching through the git history.
Signed-off-by: Jesse Larrew
---
hw/virtio-blk.c | 22 --
1 file changed, 20 insertions
VIRTIO_CONSOLE_F_MULTIPORT is set when max_nr_ports > 1, so set the config
size to include max_nr_ports.
Signed-off-by: Jesse Larrew
---
hw/virtio-serial-bus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 9cd9
len instead.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 573c669..bdbfc18 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -73,7 +73,6 @@ typedef struct VirtIONet
table that uses the full size of the
config struct. These dummy tables will be replaced on a per-driver basis.
Signed-off-by: Jesse Larrew
---
hw/9pfs/virtio-9p-device.c | 15 ++-
hw/virtio-balloon.c| 15 ---
hw/virtio-blk.c| 14 +++---
hw/virtio
There are two feature bits for virtio-balloon:
VIRTIO_BALLOON_F_MUST_TELL_HOST, and
VIRTIO_BALLOON_F_STATS_VQ.
Since these features don't require additional fields in the config struct,
set the 'end' field to the end of the last field in the struct.
Signed-off-by: Jesse
Since none of the existing feature bits changed the layout of struct
VirtIOSCSIConf, set the minimum struct size to use the full struct (i.e
endof(struct VirtIOSCSIConf, cmd_per_lun)).
Signed-off-by: Jesse Larrew
---
hw/virtio-scsi.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions
Drivers affected:
* virtio_balloon
* virtio_serial_bus
* virtio_scsi
* virtio_blk
* virtio_9p
* virtio_rng
Signed-off-by: Jesse Larrew
---
hw/s390x/s390-virtio-bus.c | 8 +---
hw/s390x/virtio-ccw.c | 11 +++
hw/virtio-balloon.c| 2 +-
hw/virtio-blk.c
Move the definition of struct VirtIOFeature from virtio-net.c to virtio.h
so other virtio devices can benefit.
Signed-off-by: Jesse Larrew
---
hw/virtio-net.c | 12
hw/virtio.h | 12
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/virtio-net.c b
tree builds can be flaky sometimes, because 'make distclean'
can leave some stale bits lying around...
Maybe this is the issue?
>
> This was produced on an Ubuntu 10.04 x86_64 machine.
>
> regards,
> David
>
Sincerely,
Jesse Larrew
Software Engineer, KVM Team
IBM Linux Technology Center
Phone: (512) 973-2052 (T/L: 363-2052)
jlar...@linux.vnet.ibm.com
f (strncmp(p, "Attached", 8) == 0) {
> +put_packet(s, GDB_ATTACHED);
> +break;
> +}
> /* Unrecognised 'q' command. */
> goto unknown_command;
>
Reviewed-by: Jesse Larrew
Jesse Larrew
Software Engineer, KVM Team
IBM Linux Technology Center
Phone: (512) 973-2052 (T/L: 363-2052)
jlar...@linux.vnet.ibm.com
On 04/09/2013 12:05 AM, li guang wrote:
> 在 2013-04-08一的 23:36 -0500,Jesse Larrew写道:
>> On 04/08/2013 09:27 PM, liguang wrote:
>>> if head magic is missing or wrong unexpectedly, we'd
>>> better to prompt memssage for this.
>>> e.g.
>>> I make a mi
ugcon.c
> @@ -55,7 +55,7 @@ static void debugcon_ioport_write(void *opaque, hwaddr
> addr, uint64_t val,
> unsigned char ch = val;
>
> #ifdef DEBUG_DEBUGCON
> -printf("debugcon: write addr=0x%04x val=0x%02x\n", addr, val);
> + printf("debugcon: write
; val);
I like the reformatting, but it looks like you accidentally clobbered the
'x' when you added the ']'. This is the cause of the compiler warnings in
patch #3.
Jesse Larrew
Software Engineer, KVM Team
IBM Linux Technology Center
Phone: (512) 973-2052 (T/L: 363-2052)
jlar...@linux.vnet.ibm.com
que, hwaddr
> addr, unsigned width)
> DebugconState *s = opaque;
>
> #ifdef DEBUG_DEBUGCON
> -printf("debugcon: read addr=0x%04x\n", addr);
> +printf("debugcon: read addr=0x%04" HWADDR_PRIx "\n", addr);
I noticed that you only added b
gt;>
>> Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least
>> contains
>> the mac address.
>>
>> Cc: Jesse Larrew
>> Signed-off-by: Jason Wang
>> ---
>> hw/net/virtio-net.c |3 ++-
>> 1 files changed, 2 insertions(+
On 04/29/2013 09:55 AM, KONRAD Frédéric wrote:
> On 29/04/2013 16:42, Jesse Larrew wrote:
>> On 04/25/2013 01:59 AM, Michael S. Tsirkin wrote:
>>> On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote:
>>>> Commit 14f9b664 (hw/virtio-net.c: set config size using
On 04/29/2013 10:29 AM, KONRAD Frédéric wrote:
> On 29/04/2013 17:14, Jesse Larrew wrote:
>> On 04/29/2013 09:55 AM, KONRAD Frédéric wrote:
>>> On 29/04/2013 16:42, Jesse Larrew wrote:
>>>> On 04/25/2013 01:59 AM, Michael S. Tsirkin wrote:
>>>>> On Thu,
libqtest.c can segfault when calling fclose() if the pidfile wasn't
opened successfully. This patch fixes the issue.
Signed-off-by: Jesse Larrew
---
tests/libqtest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 884f959..87
lt; 12);
> memory_mapping_list_add_merge_sorted(list, start_paddr,
> start_vaddr, 1 << 12);
> }
>
Verified that this agrees with the spec for IA-32e/PAE paging. Note that
walk_pte2() is correct; only walk_pte() has the typo.
Reviewed by: Jesse Larrew
Jesse Larrew
Softwa
eading through the code is that this branch can be
legitimately triggered by an older kernel (protocol < 0x200). In that case,
the error message above would also be misleading.
I think a better solution might be to simply validate that the arch
specified in the ELF header matches the arch that
onst char *get_register_name_32(unsigned int reg)
> {
> -if (reg > CPU_NB_REGS32) {
> +if (reg >= CPU_NB_REGS32) {
> return NULL;
> }
> return x86_reg_info_32[reg].name;
>
Looks obvious now that it's been spotted. ;)
Reviewed by: Jesse Lar
*s, struct e1000_tx_desc *dp)
>
> if (!(txd_lower & E1000_TXD_CMD_EOP))
> return;
> -if (!(tp->tse && tp->cptse && tp->size < hdr))
> +if (!(tp->tse && tp->cptse && tp->size < tp->hdr_len))
> xmit_seg(s);
Braces here as well.
> tp->tso_frames = 0;
> tp->sum_needed = 0;
>
Although the style issues were present to begin with, we may as well take
the opportunity to fix them.
Sincerely,
Jesse Larrew
Software Engineer, KVM Team
IBM Linux Technology Center
Phone: (512) 973-2052 (T/L: 363-2052)
jlar...@linux.vnet.ibm.com
The virtio-net driver can determine the required size of the config struct
dynamically by inspecting the feature bits in host_features. The natural
place to perform this calculation is within the driver's init routine.
However, host_features isn't set until later when the device is plugged
into a b
.
Signed-off-by: Jesse Larrew
---
hw/net/virtio-net.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 3a6829c..e09288f 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -21,6 +21,7 @@
#include "hw/virtio/virtio-
the
bus is attached and host_features is available for use.
This patch extends struct VirtioDeviceClass to add a bus_plugged() method.
If implemented by a device, it will be called after the device is attached
to a bus.
Signed-off-by: Jesse Larrew
---
hw/virtio/virtio.c | 3 +++
include
With a more permanent solution in place, the workaround in commit
e9016ee2bda1b7757072b856b2196f691aee3388 is no longer needed.
Signed-off-by: Jesse Larrew
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index
On 06/04/2013 12:35 PM, Andreas Färber wrote:
> Hi,
>
Hi Andreas!
Thanks for the review. :)
> Am 04.06.2013 18:22, schrieb Jesse Larrew:
>> Virtio devices are initialized prior to plugging them into a bus. However,
>> other initializations (such as host_features) don
r
> s/g */
> +
> #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
> #define VIRTIO_NET_S_ANNOUNCE2 /* Announcement is needed */
>
> @@ -70,7 +72,9 @@ struct virtio_net_config {
> __u16 max_virtqueue_pairs;
> } __attribute__((packed));
>
>
On 06/06/2013 03:09 PM, Dave Jones wrote:
> On Thu, Jun 06, 2013 at 02:59:44PM -0500, Jesse Larrew wrote:
>
> > > pr_debug("%s: xmit %p %pM\n", vi->dev->name, skb, dest);
> > > +if (vi->mergeable_rx_bufs)
> > > +
53 matches
Mail list logo