Re: [Qemu-devel] [PATCH v11 for-4.0 09/11] qemu_thread: supplement error handling for migration
在 2019/2/1 下午11:34, Markus Armbruster 写道: Dave, I tried to review the error paths, in particular resource cleanup, but there's a lot going on, and I'm not feeling confident. Please have a close look. Fei Li writes: From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state for callers that just report errors and choose not to continue on. Besides, make compress_threads_save_cleanup() cope with partially initialized comp_param[i] to adapt to the new qemu_thread_create() failure case. Cc: Markus Armbruster Cc: Dr. David Alan Gilbert Signed-off-by: Fei Li Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c| 35 +--- migration/postcopy-ram.c | 16 ++--- migration/ram.c | 70 ++-- migration/savevm.c | 12 --- 4 files changed, 89 insertions(+), 44 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 1da71211c8..0034ca1334 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -447,10 +447,13 @@ static void process_incoming_migration_co(void *opaque) goto fail; } -/* TODO: let the further caller handle the error instead of abort() */ -qemu_thread_create(>colo_incoming_thread, "COLO incoming", - colo_process_incoming_thread, mis, - QEMU_THREAD_JOINABLE, _abort); +if (qemu_thread_create(>colo_incoming_thread, "COLO incoming", + colo_process_incoming_thread, mis, + QEMU_THREAD_JOINABLE, _err) < 0) { +error_reportf_err(local_err, "failed to create " + "colo_process_incoming_thread: "); +goto fail; +} mis->have_colo_incoming_thread = true; qemu_coroutine_yield(); @@ -2349,6 +2352,7 @@ out: static int open_return_path_on_source(MigrationState *ms, bool create_thread) { +Error *local_err = NULL; ms->rp_state.from_dst_file = qemu_file_get_return_path(ms->to_dst_file); if (!ms->rp_state.from_dst_file) { @@ -2362,10 +2366,15 @@ static int open_return_path_on_source(MigrationState *ms, return 0; } -/* TODO: let the further caller handle the error instead of abort() here */ -qemu_thread_create(>rp_state.rp_thread, "return path", - source_return_path_thread, ms, - QEMU_THREAD_JOINABLE, _abort); +if (qemu_thread_create(>rp_state.rp_thread, "return path", + source_return_path_thread, ms, + QEMU_THREAD_JOINABLE, _err) < 0) { +error_reportf_err(local_err, + "failed to create source_return_path_thread: "); +qemu_fclose(ms->rp_state.from_dst_file); +ms->rp_state.from_dst_file = NULL; +return -1; + } trace_open_return_path_on_source_continue(); @@ -3201,9 +3210,13 @@ void migrate_fd_connect(MigrationState *s, Error *error_in) if (multifd_save_setup() != 0) { migrate_set_state(>state, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED); migrate_fd_cleanup(s); return; } -/* TODO: let the further caller handle the error instead of abort() here */ -qemu_thread_create(>thread, "live_migration", migration_thread, s, - QEMU_THREAD_JOINABLE, _abort); +if (qemu_thread_create(>thread, "live_migration", migration_thread, s, + QEMU_THREAD_JOINABLE, _in) < 0) { +error_reportf_err(error_in, "failed to create migration_thread: "); +migrate_set_state(>state, s->state, MIGRATION_STATUS_FAILED); +migrate_fd_cleanup(s); Is there anything to clean up for multifd_save_setup()? Dave? +return; +} s->migration_thread_running = true; } diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 221ea24919..0934a1403a 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -1083,6 +1083,8 @@ retry: int postcopy_ram_enable_notify(MigrationIncomingState *mis) { +Error *local_err = NULL; + /* Open the fd for the kernel to give us userfaults */ mis->userfault_fd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); if (mis->userfault_fd == -1) { @@ -1109,10 +,16 @@ int postcopy_ram_enable_notify(MigrationIncomingState *mis) } qemu_sem_init(>fault_thread_sem, 0); -/* TODO: let the further caller handle the error instead of abort() here */ -qemu_thread_create(>fault_thread, "postcopy/fault", -
Re: [Qemu-devel] [PATCH 01/10] hw/rdma: Switch to generic error reporting way
On Fri, Feb 01, 2019 at 12:36:20PM +, Dr. David Alan Gilbert wrote: > * Yuval Shaia (yuval.sh...@oracle.com) wrote: > > Utilize error_report for all pr_err calls and some pr_dbg that are > > considered as errors. > > For the remaining pr_dbg calls, the important ones were replaced by > > trace points while other deleted. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_backend.c| 336 ++ > > hw/rdma/rdma_rm.c | 121 +--- > > hw/rdma/rdma_utils.c | 11 +- > > hw/rdma/rdma_utils.h | 45 + > > hw/rdma/trace-events | 32 +++- > > hw/rdma/vmw/pvrdma.h | 2 +- > > hw/rdma/vmw/pvrdma_cmd.c | 113 +++- > > hw/rdma/vmw/pvrdma_dev_ring.c | 26 +-- > > hw/rdma/vmw/pvrdma_main.c | 132 + > > hw/rdma/vmw/pvrdma_qp_ops.c | 49 ++--- > > hw/rdma/vmw/trace-events | 16 +- > > 11 files changed, 337 insertions(+), 546 deletions(-) > > > > diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c > > index fd571f21e5..5f60856d19 100644 > > --- a/hw/rdma/rdma_backend.c > > +++ b/hw/rdma/rdma_backend.c > > @@ -14,7 +14,6 @@ > > */ > > > > #include "qemu/osdep.h" > > -#include "qemu/error-report.h" > > #include "sysemu/sysemu.h" > > #include "qapi/error.h" > > #include "qapi/qmp/qlist.h" > > @@ -39,7 +38,6 @@ > > > > typedef struct BackendCtx { > > void *up_ctx; > > -bool is_tx_req; > > struct ibv_sge sge; /* Used to save MAD recv buffer */ > > } BackendCtx; > > > > @@ -52,7 +50,7 @@ static void (*comp_handler)(void *ctx, struct ibv_wc *wc); > > > > static void dummy_comp_handler(void *ctx, struct ibv_wc *wc) > > { > > -pr_err("No completion handler is registered\n"); > > +rdma_error_report("No completion handler is registered"); > > } > > > > static inline void complete_work(enum ibv_wc_status status, uint32_t > > vendor_err, > > @@ -66,29 +64,24 @@ static inline void complete_work(enum ibv_wc_status > > status, uint32_t vendor_err, > > comp_handler(ctx, ); > > } > > > > -static void poll_cq(RdmaDeviceResources *rdma_dev_res, struct ibv_cq *ibcq) > > +static void rdma_poll_cq(RdmaDeviceResources *rdma_dev_res, struct ibv_cq > > *ibcq) > > { > > int i, ne; > > BackendCtx *bctx; > > struct ibv_wc wc[2]; > > > > -pr_dbg("Entering poll_cq loop on cq %p\n", ibcq); > > do { > > ne = ibv_poll_cq(ibcq, ARRAY_SIZE(wc), wc); > > > > -pr_dbg("Got %d completion(s) from cq %p\n", ne, ibcq); > > +trace_rdma_poll_cq(ne, ibcq); > > > > for (i = 0; i < ne; i++) { > > -pr_dbg("wr_id=0x%" PRIx64 "\n", wc[i].wr_id); > > -pr_dbg("status=%d\n", wc[i].status); > > - > > bctx = rdma_rm_get_cqe_ctx(rdma_dev_res, wc[i].wr_id); > > if (unlikely(!bctx)) { > > -pr_dbg("Error: Failed to find ctx for req %" PRId64 "\n", > > - wc[i].wr_id); > > +rdma_error_report("No matching ctx for req %"PRId64, > > + wc[i].wr_id); > > > > > -#define init_pr_dbg(void) > > -#define pr_dbg(fmt, ...) > > -#define pr_dbg_buf(title, buf, len) > > -#endif > > +#define rdma_error_report(fmt, ...) \ > > +error_report("%s: " fmt, "rdma", ## __VA_ARGS__) > > +#define rdma_warn_report(fmt, ...) \ > > +warn_report("%s: " fmt, "rdma", ## __VA_ARGS__) > > +#define rdma_info_report(fmt, ...) \ > > +info_report("%s: " fmt, "rdma", ## __VA_ARGS__) > > Is it worth defining these? My temptation would be just to use the > __func__ string, i.e. the case above would become: > > error_report("%s: No matching ctx for req %"PRId64, > __func__, wc[i].wr_id); > > That's used in lots of places, and gives more useful information. > > Dave This patch all about stripping out debug messages as they are correctly hardly used and replace the important error messages with error_report. Adding __func__ to error report sounds like (to me) a debugging info while error reports are more like something the admin can do something with. Well the above "No matching ctx..." might not be a good example but majority of error reports related to external resources the device is using (backend RDMA device, host's NIC etc) and for those the admin do not really need the functions names. The wrappers above (rdma_error_report and friends) are only to categorize error report so admin will know which area is affected. If there is another mechanism for this then i'd be happy to adopt. > > > > > > void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen); > > void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len); > > diff --git a/hw/rdma/trace-events b/hw/rdma/trace-events > > index c4c202e647..09cec43fd8 100644 > > --- a/hw/rdma/trace-events > > +++ b/hw/rdma/trace-events > > @@ -1,5 +1,31 @@ > > # See
Re: [Qemu-devel] [PATCH v11 for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize
在 2019/2/1 下午9:04, Markus Armbruster 写道: Fei Li writes: From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 0b170f6328..19b4b9a8fa 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -544,11 +544,16 @@ static void emulated_realize(CCIDCardState *base, Error **errp) error_setg(errp, "%s: failed to initialize vcard", TYPE_EMULATED_CCID); goto out2; } -/* TODO: let the further caller handle the error instead of abort() here */ -qemu_thread_create(>event_thread_id, "ccid/event", event_thread, - card, QEMU_THREAD_JOINABLE, _abort); -qemu_thread_create(>apdu_thread_id, "ccid/apdu", handle_apdu_thread, - card, QEMU_THREAD_JOINABLE, _abort); +if (qemu_thread_create(>event_thread_id, "ccid/event", event_thread, + card, QEMU_THREAD_JOINABLE, errp) < 0) { +goto out2; +} +if (qemu_thread_create(>apdu_thread_id, "ccid/apdu", + handle_apdu_thread, card, + QEMU_THREAD_JOINABLE, errp) < 0) { +qemu_thread_join(>event_thread_id); What makes event_thread terminate here? I'm asking because if it doesn't, the join will hang. Oops, my neglect.. Could we add a `qemu_thread_cancel(card->event_thread_id);` here before the join()? Have a nice day, thanks Fei +goto out2; +} return;
Re: [Qemu-devel] [PATCH 07/10] monitor: Expose pvrdma device statistics counters
On Fri, Feb 01, 2019 at 11:42:57AM +, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com) wrote: > > Eric Blake writes: > > > > > On 1/31/19 2:08 PM, Yuval Shaia wrote: > > >> On Thu, Jan 31, 2019 at 07:17:16AM -0600, Eric Blake wrote: > > >>> On 1/31/19 7:08 AM, Yuval Shaia wrote: > > Signed-off-by: Yuval Shaia > > --- > > hmp-commands-info.hx | 14 ++ > > monitor.c| 6 ++ > > 2 files changed, 20 insertions(+) > > >> > > >> Hi Eric, > > >> > > >>> > > >>> Commit message should state WHY this is being added as an HMP-only > > >>> command, and does not have a QMP counterpart. It may be okay if the > > >>> interface is only designed to be useful to developers, but having that > > >>> justification in the git log is important. > > >> > > >> Thanks for your review. > > >> > > >> See, i need this interface mainly for development/debug purposes, to help > > >> troubleshot problems and to give insights to what device "is doing". > > >> > > >> Trace points are great but not effective in high load. > > >> QMP as i see it, and correct me if i'm wrong, is used to report > > >> management > > >> events etc and also here, is not effective in high load. > > > > If QMP is not effective, HMP won't be effective, either. But I guess > > you mean something else, namely QMP *events* aren't effective, but > > *polling* is. > > > > That's an argument for polling, not an argument for not supporting QMP. > > > > >> I choose this interface as it is interactive, i.e. whenever i need the > > >> info > > >> i trigger 'info pvrdmastats' command from the monitor console. > > >> > > >> During my research i notice that some devices (or families) have nice > > >> user > > >> interface via virsh (blkstat, ifstat, memstat etc). Is it the preferred > > >> way > > >> for non-devel/debug purposes? > > > > Libvirt interfaces like these are built on top of *QMP* interfaces. If > > a libvirt interface would be useful, that's another argument for > > supporting QMP. > > > > > Using existing HMP-only debug interfaces as the design you copied is > > > indeed acceptable justification for making yours HMP-only as well. So > > > now you just need to copy the rationale from this email into your commit > > > message, so it doesn't get lost. > > > > Yes. If we conclude HMP-only is okay, then the rationale for it goes > > into your commit message. > > > > If we conclude we want HMP and QMP, I'll be happy to assist you with > > adapting your patch. > > > > HMP commands without a QMP equivalent are okay if their functionality > > makes no sense in QMP, or is of use only for human users. > > > > Example for "makes no sense in QMP": setting the current CPU, because a > > QMP monitor doesn't have a current CPU. > > > > Examples for "is of use only for human users": HMP command "help", the > > integrated pocket calculator. > > > > Debugging commands are kind of borderline. Debugging is commonly a > > human activity, where HMP is just fine. However, humans create tools to > > assist with their activities, and then QMP is useful. While I wouldn't > > encourage HMP-only for the debugging use case, I wouldn't veto it. > > > > "Device statistics" sounds like it should have debugging uses. But > > statistics often have non-debugging uses as well. What use cases can > > you imagine for this command? > > I think the question here partially comes down to how 'stable' the set > of statistics is and how useful they are to non-developers. > The 'stable' part is a question because when you expose something via > QMP it's part of the ABI so people don't like it changing. > If they're things that are generic and likely to stay the same then they > should probably go via QMP (e.g. bandwidth, requests/second). > If they're things that are about the internal state of your > implementation and just for debug, then they're fine to be HMP only. > You can add them to the qmp as well, even if they're not stable by > prefixing the name with an x-. > > Dave Thanks for giving one more point of view, yes, this interface is not "stable", I exposed the stuff i need now so it is highly reasonable that in the future it will be enhanced and new stuff would be added. Those things represent internal state of the device. > > > >> If this is the correct method for this purpose then let me know and i'll > > >> update the git log message accordingly. > -- > Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
Re: [Qemu-devel] [PATCH 07/10] monitor: Expose pvrdma device statistics counters
On Fri, Feb 01, 2019 at 08:33:44AM +0100, Markus Armbruster wrote: > Eric Blake writes: > > > On 1/31/19 2:08 PM, Yuval Shaia wrote: > >> On Thu, Jan 31, 2019 at 07:17:16AM -0600, Eric Blake wrote: > >>> On 1/31/19 7:08 AM, Yuval Shaia wrote: > Signed-off-by: Yuval Shaia > --- > hmp-commands-info.hx | 14 ++ > monitor.c| 6 ++ > 2 files changed, 20 insertions(+) > >> > >> Hi Eric, > >> > >>> > >>> Commit message should state WHY this is being added as an HMP-only > >>> command, and does not have a QMP counterpart. It may be okay if the > >>> interface is only designed to be useful to developers, but having that > >>> justification in the git log is important. > >> > >> Thanks for your review. > >> > >> See, i need this interface mainly for development/debug purposes, to help > >> troubleshot problems and to give insights to what device "is doing". > >> > >> Trace points are great but not effective in high load. > >> QMP as i see it, and correct me if i'm wrong, is used to report management > >> events etc and also here, is not effective in high load. > > If QMP is not effective, HMP won't be effective, either. But I guess > you mean something else, namely QMP *events* aren't effective, but > *polling* is. Yeah. I really meant to say "QMP is not effective *choice* for my needs". > > That's an argument for polling, not an argument for not supporting QMP. > > >> I choose this interface as it is interactive, i.e. whenever i need the info > >> i trigger 'info pvrdmastats' command from the monitor console. > >> > >> During my research i notice that some devices (or families) have nice user > >> interface via virsh (blkstat, ifstat, memstat etc). Is it the preferred way > >> for non-devel/debug purposes? > > Libvirt interfaces like these are built on top of *QMP* interfaces. If > a libvirt interface would be useful, that's another argument for > supporting QMP. I was asking in a context of what is the standard way to do it. > > > Using existing HMP-only debug interfaces as the design you copied is > > indeed acceptable justification for making yours HMP-only as well. So > > now you just need to copy the rationale from this email into your commit > > message, so it doesn't get lost. > > Yes. If we conclude HMP-only is okay, then the rationale for it goes > into your commit message. > > If we conclude we want HMP and QMP, I'll be happy to assist you with > adapting your patch. Thanks! Well, for now i want only to expose debugging-related info and have no idea yet what would be the best to expose to end-users via QMP events. Device statistics for end-users are currently exposed by the device driver in guest. If in the future we will see that this info is also needed in the host then i'll revisit it. > > HMP commands without a QMP equivalent are okay if their functionality > makes no sense in QMP, or is of use only for human users. > > Example for "makes no sense in QMP": setting the current CPU, because a > QMP monitor doesn't have a current CPU. > > Examples for "is of use only for human users": HMP command "help", the > integrated pocket calculator. > > Debugging commands are kind of borderline. Debugging is commonly a > human activity, where HMP is just fine. However, humans create tools to > assist with their activities, and then QMP is useful. While I wouldn't > encourage HMP-only for the debugging use case, I wouldn't veto it. > > "Device statistics" sounds like it should have debugging uses. But > statistics often have non-debugging uses as well. What use cases can > you imagine for this command? One use case from real live example is that this interface helped me to detect a leak in freeing a context of a resource. > > >> If this is the correct method for this purpose then let me know and i'll > >> update the git log message accordingly.
[Qemu-devel] [Bug 1814420] [NEW] drive-backup with iscsi, it will failed "Could not create image: Invalid argument"
Public bug reported: I use iscsi protocol to drive-backup: ---iscsi target--- yum -y install targetcli python-rtslib systemctl start target systemctl enable target targetcli /iscsi create iqn.2019-01.com.iaas targetcli /iscsi/iqn.2019-01.com.iaas/tpg1 set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 targetcli /iscsi/iqn.2019-01.com.iaas/tpg1/portals create 192.168.1.1 3260 targetcli /backstores/fileio create file1 /opt/file1 2G targetcli /iscsi/iqn.2019-01.com.iaas/tpg1/luns create /backstores/fileio/file1 --- Now, '{ "execute" : "drive-backup" , "arguments" : { "device" : "drive- virtio-disk0" , "sync" : "top" , "target" : "iscsi://192.168.1.1:3260/iqn.2019-01.com.iaas/0" } }' It may failed: {"id":"libvirt-1785","error":{"class":"GenericError","desc":"Could not create image: Invalid argument"}} But, This abnormal will be appear at the first time. Because when I retry again, It works very well. Then, I re-start the vm, It still be failed 'Could not create image: Invalid argument' on the first try, and the second try it will work very well. --- Host: centos 7.5 qemu version: 2.12 and 3.1.0 qemu command line: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/opt/vol/sas/fb0c7c37-13e7-41fe-b3f8-f0fbaaeec7ce,format=qcow2,if=none,id=drive-virtio-disk0,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on -drive file=/opt/vol/sas/bde66671-536d-49cd-8b46-a4f1ea7be513,format=qcow2,if=none,id=drive-virtio-disk1,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on -netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=34 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:85:45:3e:d4:3a,bus=pci.0,addr=0x6 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=35,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 0.0.0.0:0,password -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814420 Title: drive-backup with iscsi, it will failed "Could not create image: Invalid argument" Status in QEMU: New Bug description: I use iscsi protocol to drive-backup: ---iscsi target--- yum -y install targetcli python-rtslib systemctl start target systemctl enable target targetcli /iscsi create iqn.2019-01.com.iaas targetcli /iscsi/iqn.2019-01.com.iaas/tpg1 set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 targetcli /iscsi/iqn.2019-01.com.iaas/tpg1/portals create 192.168.1.1 3260 targetcli /backstores/fileio create file1 /opt/file1 2G targetcli /iscsi/iqn.2019-01.com.iaas/tpg1/luns create /backstores/fileio/file1 --- Now, '{ "execute" : "drive-backup" , "arguments" : { "device" : "drive-virtio-disk0" , "sync" : "top" , "target" : "iscsi://192.168.1.1:3260/iqn.2019-01.com.iaas/0" } }' It may failed: {"id":"libvirt-1785","error":{"class":"GenericError","desc":"Could not create image: Invalid argument"}} But, This abnormal will be appear at the first time. Because when I retry again, It works very well. Then, I re-start the vm, It still be failed 'Could not create image: Invalid argument' on the first try, and the second try it will work very well. --- Host: centos 7.5 qemu version: 2.12 and 3.1.0 qemu command line: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config
[Qemu-devel] [Bug 1814418] Re: persistent bitmap will be inconsistent when qemu crash,
** Description changed: Follow these steps to reappear the bug: 1. start qemu 2. add persistent bitmap: '{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}' 3. stop qemu (Friendly shutdown) 4. re-start qemu 5. kill -9 qemu (simulate Host crash, eg. lose power) 6. re-start qemu Now, the '{ "execute": "query-block" }' can't find the bitmap0. I can understand at this point, because the bitmap0 has not been synchronized yet. But, when I try to add persistent bitmap0 again: '{ "execute": "block- dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}', It failed: {"id":"libvirt-42","error":{"class":"GenericError","desc":"Can't make bitmap 'bitmap0' persistent in 'drive-virtio-disk1': Bitmap with the same name is already stored"}} In other word, when qemu crash, the qcow2 image remain the incomplete persistent bitmap. --- + host: centos 7.5 qemu version: 2.12.0 and 3.1.0, other version I does not test yet. qemu command: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/opt/vol/sas/fb0c7c37-13e7-41fe-b3f8-f0fbaaeec7ce,format=qcow2,if=none,id=drive-virtio-disk0,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on -drive file=/opt/vol/sas/bde66671-536d-49cd-8b46-a4f1ea7be513,format=qcow2,if=none,id=drive-virtio-disk1,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on -netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=34 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:85:45:3e:d4:3a,bus=pci.0,addr=0x6 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=35,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 0.0.0.0:0,password -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814418 Title: persistent bitmap will be inconsistent when qemu crash, Status in QEMU: New Bug description: Follow these steps to reappear the bug: 1. start qemu 2. add persistent bitmap: '{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}' 3. stop qemu (Friendly shutdown) 4. re-start qemu 5. kill -9 qemu (simulate Host crash, eg. lose power) 6. re-start qemu Now, the '{ "execute": "query-block" }' can't find the bitmap0. I can understand at this point, because the bitmap0 has not been synchronized yet. But, when I try to add persistent bitmap0 again: '{ "execute": "block- dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}', It failed: {"id":"libvirt-42","error":{"class":"GenericError","desc":"Can't make bitmap 'bitmap0' persistent in 'drive-virtio-disk1': Bitmap with the same name is already stored"}} In other word, when qemu crash, the qcow2 image remain the incomplete persistent bitmap. --- host: centos 7.5 qemu version: 2.12.0 and 3.1.0, other version I does not test yet. qemu command: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive
Re: [Qemu-devel] [RFC PATCH] block: local qiov helper
Patchew URL: https://patchew.org/QEMU/20190125164601.130556-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === Configure options: --enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=2.0 ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not work # QEMU configure log Sun Feb 3 05:54:12 UTC 2019 # Configured with: '/tmp/qemu-test/src/configure' '--enable-werror' '--target-list=x86_64-softmmu,aarch64-softmmu' '--prefix=/tmp/qemu-test/install' '--python=/usr/bin/python3' '--cross-prefix=x86_64-w64-mingw32-' '--enable-trace-backends=simple' '--enable-gnutls' '--enable-nettle' '--enable-curl' '--enable-vnc' '--enable-bzip2' '--enable-guest-agent' '--with-sdlabi=2.0' --- funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 636 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 638 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 640 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 642 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 644 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 646 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 648 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 650 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc
[Qemu-devel] [Bug 1814418] Re: persistent bitmap will be inconsistent when qemu crash,
** Description changed: Follow these steps to reappear the bug: 1. start qemu 2. add persistent bitmap: '{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}' - 3. kill -9 qemu (simulate Host crash, eg. lose power) - 4. restart qemu + 3. stop qemu (Friendly shutdown) + 4. re-start qemu + 5. kill -9 qemu (simulate Host crash, eg. lose power) + 6. re-start qemu Now, the '{ "execute": "query-block" }' can't find the bitmap0. I can understand at this point, because the bitmap0 has not been synchronized yet. But, when I try to add persistent bitmap0 again: '{ "execute": "block- dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}', It failed: {"id":"libvirt-42","error":{"class":"GenericError","desc":"Can't make bitmap 'bitmap0' persistent in 'drive-virtio-disk1': Bitmap with the same name is already stored"}} In other word, when qemu crash, the qcow2 image remain the incomplete persistent bitmap. --- qemu version: 2.12.0 and 3.1.0, other version I does not test yet. qemu command: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/opt/vol/sas/fb0c7c37-13e7-41fe-b3f8-f0fbaaeec7ce,format=qcow2,if=none,id=drive-virtio-disk0,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on -drive file=/opt/vol/sas/bde66671-536d-49cd-8b46-a4f1ea7be513,format=qcow2,if=none,id=drive-virtio-disk1,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on -netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=34 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:85:45:3e:d4:3a,bus=pci.0,addr=0x6 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=35,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 0.0.0.0:0,password -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814418 Title: persistent bitmap will be inconsistent when qemu crash, Status in QEMU: New Bug description: Follow these steps to reappear the bug: 1. start qemu 2. add persistent bitmap: '{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}' 3. stop qemu (Friendly shutdown) 4. re-start qemu 5. kill -9 qemu (simulate Host crash, eg. lose power) 6. re-start qemu Now, the '{ "execute": "query-block" }' can't find the bitmap0. I can understand at this point, because the bitmap0 has not been synchronized yet. But, when I try to add persistent bitmap0 again: '{ "execute": "block- dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}', It failed: {"id":"libvirt-42","error":{"class":"GenericError","desc":"Can't make bitmap 'bitmap0' persistent in 'drive-virtio-disk1': Bitmap with the same name is already stored"}} In other word, when qemu crash, the qcow2 image remain the incomplete persistent bitmap. --- qemu version: 2.12.0 and 3.1.0, other version I does not test yet. qemu command: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
[Qemu-devel] [Bug 1814418] [NEW] persistent bitmap will be inconsistent when qemu crash,
Public bug reported: Follow these steps to reappear the bug: 1. start qemu 2. add persistent bitmap: '{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}' 3. kill -9 qemu (simulate Host crash, eg. lose power) 4. restart qemu Now, the '{ "execute": "query-block" }' can't find the bitmap0. I can understand at this point, because the bitmap0 has not been synchronized yet. But, when I try to add persistent bitmap0 again: '{ "execute": "block- dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}', It failed: {"id":"libvirt-42","error":{"class":"GenericError","desc":"Can't make bitmap 'bitmap0' persistent in 'drive-virtio-disk1': Bitmap with the same name is already stored"}} In other word, when qemu crash, the qcow2 image remain the incomplete persistent bitmap. --- qemu version: 2.12.0 and 3.1.0, other version I does not test yet. qemu command: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/opt/vol/sas/fb0c7c37-13e7-41fe-b3f8-f0fbaaeec7ce,format=qcow2,if=none,id=drive-virtio-disk0,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on -drive file=/opt/vol/sas/bde66671-536d-49cd-8b46-a4f1ea7be513,format=qcow2,if=none,id=drive-virtio-disk1,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on -netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=34 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:85:45:3e:d4:3a,bus=pci.0,addr=0x6 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=35,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 0.0.0.0:0,password -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814418 Title: persistent bitmap will be inconsistent when qemu crash, Status in QEMU: New Bug description: Follow these steps to reappear the bug: 1. start qemu 2. add persistent bitmap: '{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}' 3. kill -9 qemu (simulate Host crash, eg. lose power) 4. restart qemu Now, the '{ "execute": "query-block" }' can't find the bitmap0. I can understand at this point, because the bitmap0 has not been synchronized yet. But, when I try to add persistent bitmap0 again: '{ "execute": "block- dirty-bitmap-add", "arguments": {"node": "drive-virtio-disk1","name": "bitmap0", "persistent":true }}', It failed: {"id":"libvirt-42","error":{"class":"GenericError","desc":"Can't make bitmap 'bitmap0' persistent in 'drive-virtio-disk1': Bitmap with the same name is already stored"}} In other word, when qemu crash, the qcow2 image remain the incomplete persistent bitmap. --- qemu version: 2.12.0 and 3.1.0, other version I does not test yet. qemu command: qemu-system-x86_64 -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-190-test./master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -m 1024 -mem-prealloc -mem-path /dev/hugepages1G/libvirt/qemu/190-test -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1c8611c2-a18a-4b1c-b40b-9d82040eafa4 -smbios type=1,manufacturer=IaaS -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/opt/vol/sas/fb0c7c37-13e7-41fe-b3f8-f0fbaaeec7ce,format=qcow2,if=none,id=drive-virtio-disk0,cache=writeback -device
Re: [Qemu-devel] [PATCH 0/1] migration: calculate expected_downtime considering redirtied ram
Patchew URL: https://patchew.org/QEMU/20190122150543.16889-1-bal...@linux.vnet.ibm.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === CC net/util.o CC net/hub.o /tmp/qemu-test/src/migration/migration.c: In function 'migration_update_counters': /tmp/qemu-test/src/migration/migration.c:2907:9: error: 'remaining_ram_transfer_time' undeclared (first use in this function) remaining_ram_transfer_time = ram_counters.remaining / bandwidth ^~~ /tmp/qemu-test/src/migration/migration.c:2907:9: note: each undeclared identifier is reported only once for each function it appears in /tmp/qemu-test/src/migration/migration.c:2907:73: error: expected ';' before 'newly_dirtied_ram' remaining_ram_transfer_time = ram_counters.remaining / bandwidth ^ ; The full log is available at http://patchew.org/logs/20190122150543.16889-1-bal...@linux.vnet.ibm.com/testing.docker-mingw@fedora/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@redhat.com
Re: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support
Patchew URL: https://patchew.org/QEMU/20190202005610.24048-1-cr...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support Message-id: 20190202005610.24048-1-cr...@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20190202005610.24048-1-cr...@redhat.com -> patchew/20190202005610.24048-1-cr...@redhat.com * [new tag] patchew/20190202011048.12343-1-js...@redhat.com -> patchew/20190202011048.12343-1-js...@redhat.com Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone' Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc' Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers' Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios' Submodule 'roms/openhackware' (https://git.qemu.org/git/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/seabios-hppa' (https://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa' Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios' Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot' Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex' Submodule 'tests/fp/berkeley-softfloat-3' (https://github.com/cota/berkeley-softfloat-3) registered for path 'tests/fp/berkeley-softfloat-3' Submodule 'tests/fp/berkeley-testfloat-3' (https://github.com/cota/berkeley-testfloat-3) registered for path 'tests/fp/berkeley-testfloat-3' Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into 'capstone'... Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf' Cloning into 'dtc'... Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536' Cloning into 'roms/QemuMacDrivers'... Submodule path 'roms/QemuMacDrivers': checked out 'd4e7d7ac663fcb55f1b93575445fcbca372f17a7' Cloning into 'roms/SLOF'... Submodule path 'roms/SLOF': checked out '9b7ab2fa020341dee8bf9df6c9cf40003e0136df' Cloning into 'roms/ipxe'... Submodule path 'roms/ipxe': checked out 'de4565cbe76ea9f7913a01f331be3ee901bb6e17' Cloning into 'roms/openbios'... Submodule path 'roms/openbios': checked out '441a84d3a642a10b948369c63f32367e8ff6395b' Cloning into 'roms/openhackware'... Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Cloning into 'roms/qemu-palcode'... Submodule path 'roms/qemu-palcode': checked out '51c237d7e20d05100eacadee2f61abc17e6bc097' Cloning into 'roms/seabios'... Submodule path 'roms/seabios': checked out 'a698c8995ffb2838296ec284fe3c4ad33dfca307' Cloning into 'roms/seabios-hppa'... Submodule path 'roms/seabios-hppa': checked out '1ef99a01572c2581c30e16e6fe69e9ea2ef92ce0' Cloning into 'roms/sgabios'... Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a' Cloning into 'roms/skiboot'... Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc' Cloning into 'roms/u-boot'... Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943' Cloning into 'roms/u-boot-sam460ex'... Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588' Cloning into 'tests/fp/berkeley-softfloat-3'... Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037' Cloning into 'tests/fp/berkeley-testfloat-3'... Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3' Cloning into 'ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce' Switched to a new branch 'test' 6655fa7 Boot Linux Console Test: add a test for alpha + clipper f6dd48f Boot Linux Console Test: add a test for s390x +
Re: [Qemu-devel] [PULL 0/8] Usb 20190130 patches
Patchew URL: https://patchew.org/QEMU/20190130073426.11525-1-kra...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === Configure options: --enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=2.0 ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not work # QEMU configure log Sat Feb 2 21:26:32 UTC 2019 # Configured with: '/tmp/qemu-test/src/configure' '--enable-werror' '--target-list=x86_64-softmmu,aarch64-softmmu' '--prefix=/tmp/qemu-test/install' '--python=/usr/bin/python3' '--cross-prefix=x86_64-w64-mingw32-' '--enable-trace-backends=simple' '--enable-gnutls' '--enable-nettle' '--enable-curl' '--enable-vnc' '--enable-bzip2' '--enable-guest-agent' '--with-sdlabi=2.0' --- funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 636 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 638 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 640 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 642 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 644 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 646 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 648 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 650 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc
Re: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support
Patchew URL: https://patchew.org/QEMU/20190202005610.24048-1-cr...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support Type: series Message-id: 20190202005610.24048-1-cr...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu t [tag update]patchew/20190202005610.24048-1-cr...@redhat.com -> patchew/20190202005610.24048-1-cr...@redhat.com Switched to a new branch 'test' 17035afa87 Boot Linux Console Test: add a test for alpha + clipper 664f768105 Boot Linux Console Test: add a test for s390x + s390-ccw-virtio af7932545d Boot Linux Console Test: add a test for arm + virt afe4751b4d Boot Linux Console Test: add a test for aarch64 + virt 34684e2787 Boot Linux Console Test: add a test for ppc64 + pseries 828dece1c0 Boot Linux Console Test: add a test for mips64el + malta eafeed88f9 Boot Linux Console Test: add a test for mips + malta 04af0c729d scripts/qemu.py: support adding a console with the default serial device cb969cd6fe Boot Linux Console Test: refactor the console watcher into utility method a446d2e9ba Boot Linux Console Test: increase timeout cbedab968c Boot Linux Console Test: add common kernel command line options 14bf9a0f17 Boot Linux Console Test: update the x86_64 kernel b41b04b466 Boot Linux Console Test: rename the x86_64 after the arch and machine d957397957 Acceptance tests: look for target architecture in test tags first e15cd2534a Acceptance tests: use "arch:" tag to filter target specific tests c558ad7dc5 Acceptance tests: introduce arch parameter and attribute 981c7f300d Acceptance tests: fix doc reference to avocado_qemu directory 19b5d68909 Acceptance tests: improve docstring on pick_default_qemu_bin() db08e24a7e Acceptance tests: show avocado test execution by default fe7c5846dc scripts/qemu.py: log QEMU launch command line === OUTPUT BEGIN === 1/20 Checking commit fe7c5846dca6 (scripts/qemu.py: log QEMU launch command line) 2/20 Checking commit db08e24a7ead (Acceptance tests: show avocado test execution by default) 3/20 Checking commit 19b5d6890978 (Acceptance tests: improve docstring on pick_default_qemu_bin()) 4/20 Checking commit 981c7f300d93 (Acceptance tests: fix doc reference to avocado_qemu directory) 5/20 Checking commit c558ad7dc50a (Acceptance tests: introduce arch parameter and attribute) 6/20 Checking commit e15cd2534a41 (Acceptance tests: use "arch:" tag to filter target specific tests) 7/20 Checking commit d95739795725 (Acceptance tests: look for target architecture in test tags first) 8/20 Checking commit b41b04b4662d (Boot Linux Console Test: rename the x86_64 after the arch and machine) 9/20 Checking commit 14bf9a0f170e (Boot Linux Console Test: update the x86_64 kernel) 10/20 Checking commit cbedab968cbf (Boot Linux Console Test: add common kernel command line options) 11/20 Checking commit a446d2e9baf6 (Boot Linux Console Test: increase timeout) 12/20 Checking commit cb969cd6fe2b (Boot Linux Console Test: refactor the console watcher into utility method) 13/20 Checking commit 04af0c729dfa (scripts/qemu.py: support adding a console with the default serial device) 14/20 Checking commit eafeed88f9b4 (Boot Linux Console Test: add a test for mips + malta) 15/20 Checking commit 828dece1c0ce (Boot Linux Console Test: add a test for mips64el + malta) ERROR: line over 90 characters #61: FILE: tests/acceptance/boot_linux_console.py:116: +[1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/#linux-source-2.6.32_2.6.32-48 ERROR: line over 90 characters #62: FILE: tests/acceptance/boot_linux_console.py:117: +[2] https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official total: 2 errors, 0 warnings, 49 lines checked Patch 15/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 16/20 Checking commit 34684e2787d1 (Boot Linux Console Test: add a test for ppc64 + pseries) 17/20 Checking commit afe4751b4d91 (Boot Linux Console Test: add a test for aarch64 + virt) WARNING: line over 80 characters #51: FILE: tests/acceptance/boot_linux_console.py:170: +kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0' total: 0 errors, 1 warnings, 31 lines checked Patch 17/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 18/20 Checking commit af7932545dc5 (Boot Linux Console Test: add a test for arm + virt) WARNING: line over 80 characters #48: FILE:
Re: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support
Patchew URL: https://patchew.org/QEMU/20190202005610.24048-1-cr...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190202005610.24048-1-cr...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu - [tag update] patchew/20190202005610.24048-1-cr...@redhat.com -> patchew/20190202005610.24048-1-cr...@redhat.com * [new tag] patchew/20190202144531.5772-1-...@gmx.com -> patchew/20190202144531.5772-1-...@gmx.com Switched to a new branch 'test' 13c391b Boot Linux Console Test: add a test for alpha + clipper 273b9ac Boot Linux Console Test: add a test for s390x + s390-ccw-virtio 0a9b73c Boot Linux Console Test: add a test for arm + virt e070e1d Boot Linux Console Test: add a test for aarch64 + virt 86d4a09 Boot Linux Console Test: add a test for ppc64 + pseries d2b7457 Boot Linux Console Test: add a test for mips64el + malta 4f2bf45 Boot Linux Console Test: add a test for mips + malta 5d2bc37 scripts/qemu.py: support adding a console with the default serial device e93021f Boot Linux Console Test: refactor the console watcher into utility method 58cb1eb Boot Linux Console Test: increase timeout 8e8235f Boot Linux Console Test: add common kernel command line options 5034fd3 Boot Linux Console Test: update the x86_64 kernel 14bbc9f Boot Linux Console Test: rename the x86_64 after the arch and machine 3787369 Acceptance tests: look for target architecture in test tags first 69d1e10 Acceptance tests: use "arch:" tag to filter target specific tests 8494959 Acceptance tests: introduce arch parameter and attribute ae64545 Acceptance tests: fix doc reference to avocado_qemu directory 3ca6eaa Acceptance tests: improve docstring on pick_default_qemu_bin() 8960ff3 Acceptance tests: show avocado test execution by default e154b53 scripts/qemu.py: log QEMU launch command line === OUTPUT BEGIN === 1/20 Checking commit e154b53986c2 (scripts/qemu.py: log QEMU launch command line) 2/20 Checking commit 8960ff314a40 (Acceptance tests: show avocado test execution by default) 3/20 Checking commit 3ca6eaaa5580 (Acceptance tests: improve docstring on pick_default_qemu_bin()) 4/20 Checking commit ae645458d956 (Acceptance tests: fix doc reference to avocado_qemu directory) 5/20 Checking commit 84949598dc7a (Acceptance tests: introduce arch parameter and attribute) 6/20 Checking commit 69d1e10ba586 (Acceptance tests: use "arch:" tag to filter target specific tests) 7/20 Checking commit 37873698dc9e (Acceptance tests: look for target architecture in test tags first) 8/20 Checking commit 14bbc9fdbca8 (Boot Linux Console Test: rename the x86_64 after the arch and machine) 9/20 Checking commit 5034fd3690c5 (Boot Linux Console Test: update the x86_64 kernel) 10/20 Checking commit 8e8235fd2f21 (Boot Linux Console Test: add common kernel command line options) 11/20 Checking commit 58cb1eb0af81 (Boot Linux Console Test: increase timeout) 12/20 Checking commit e93021fae9d0 (Boot Linux Console Test: refactor the console watcher into utility method) 13/20 Checking commit 5d2bc37cd347 (scripts/qemu.py: support adding a console with the default serial device) 14/20 Checking commit 4f2bf45f1281 (Boot Linux Console Test: add a test for mips + malta) 15/20 Checking commit d2b7457492bd (Boot Linux Console Test: add a test for mips64el + malta) ERROR: line over 90 characters #61: FILE: tests/acceptance/boot_linux_console.py:116: +[1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/#linux-source-2.6.32_2.6.32-48 ERROR: line over 90 characters #62: FILE: tests/acceptance/boot_linux_console.py:117: +[2] https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official total: 2 errors, 0 warnings, 49 lines checked Patch 15/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 16/20 Checking commit 86d4a092b14e (Boot Linux Console Test: add a test for ppc64 + pseries) 17/20 Checking commit e070e1db9f0f (Boot Linux Console Test: add a test for aarch64 + virt) WARNING: line over 80 characters #51: FILE: tests/acceptance/boot_linux_console.py:170: +kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0' total: 0 errors, 1 warnings, 31 lines checked Patch 17/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 18/20 Checking commit 0a9b73c4cf58 (Boot Linux Console Test: add a test for arm + virt) WARNING: line over 80
Re: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support
Patchew URL: https://patchew.org/QEMU/20190202005610.24048-1-cr...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support Type: series Message-id: 20190202005610.24048-1-cr...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 6655fa70df Boot Linux Console Test: add a test for alpha + clipper f6dd48f846 Boot Linux Console Test: add a test for s390x + s390-ccw-virtio 018f1969af Boot Linux Console Test: add a test for arm + virt 1b3a2357bc Boot Linux Console Test: add a test for aarch64 + virt a72b513a01 Boot Linux Console Test: add a test for ppc64 + pseries 53b6bd6a83 Boot Linux Console Test: add a test for mips64el + malta 9e99bc7ca7 Boot Linux Console Test: add a test for mips + malta ad537d2fcc scripts/qemu.py: support adding a console with the default serial device a90473b9e3 Boot Linux Console Test: refactor the console watcher into utility method 31e1e8e772 Boot Linux Console Test: increase timeout 71fd9a8546 Boot Linux Console Test: add common kernel command line options 1f01854455 Boot Linux Console Test: update the x86_64 kernel fd958acfdb Boot Linux Console Test: rename the x86_64 after the arch and machine 5353486417 Acceptance tests: look for target architecture in test tags first 0eec679cae Acceptance tests: use "arch:" tag to filter target specific tests d8bdead7f5 Acceptance tests: introduce arch parameter and attribute 68ac450c2b Acceptance tests: fix doc reference to avocado_qemu directory 4ef4e6bab1 Acceptance tests: improve docstring on pick_default_qemu_bin() 9255bba791 Acceptance tests: show avocado test execution by default 3401845f7e scripts/qemu.py: log QEMU launch command line === OUTPUT BEGIN === 1/20 Checking commit 3401845f7eb9 (scripts/qemu.py: log QEMU launch command line) 2/20 Checking commit 9255bba791a8 (Acceptance tests: show avocado test execution by default) 3/20 Checking commit 4ef4e6bab129 (Acceptance tests: improve docstring on pick_default_qemu_bin()) 4/20 Checking commit 68ac450c2b81 (Acceptance tests: fix doc reference to avocado_qemu directory) 5/20 Checking commit d8bdead7f506 (Acceptance tests: introduce arch parameter and attribute) 6/20 Checking commit 0eec679cae2b (Acceptance tests: use "arch:" tag to filter target specific tests) 7/20 Checking commit 5353486417ba (Acceptance tests: look for target architecture in test tags first) 8/20 Checking commit fd958acfdb06 (Boot Linux Console Test: rename the x86_64 after the arch and machine) 9/20 Checking commit 1f018544557b (Boot Linux Console Test: update the x86_64 kernel) 10/20 Checking commit 71fd9a85460e (Boot Linux Console Test: add common kernel command line options) 11/20 Checking commit 31e1e8e772d2 (Boot Linux Console Test: increase timeout) 12/20 Checking commit a90473b9e34b (Boot Linux Console Test: refactor the console watcher into utility method) 13/20 Checking commit ad537d2fcc3d (scripts/qemu.py: support adding a console with the default serial device) 14/20 Checking commit 9e99bc7ca7b3 (Boot Linux Console Test: add a test for mips + malta) 15/20 Checking commit 53b6bd6a83fb (Boot Linux Console Test: add a test for mips64el + malta) ERROR: line over 90 characters #61: FILE: tests/acceptance/boot_linux_console.py:116: +[1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/#linux-source-2.6.32_2.6.32-48 ERROR: line over 90 characters #62: FILE: tests/acceptance/boot_linux_console.py:117: +[2] https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official total: 2 errors, 0 warnings, 49 lines checked Patch 15/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 16/20 Checking commit a72b513a0156 (Boot Linux Console Test: add a test for ppc64 + pseries) 17/20 Checking commit 1b3a2357bc57 (Boot Linux Console Test: add a test for aarch64 + virt) WARNING: line over 80 characters #51: FILE: tests/acceptance/boot_linux_console.py:170: +kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0' total: 0 errors, 1 warnings, 31 lines checked Patch 17/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 18/20 Checking commit 018f1969af3b (Boot Linux Console Test: add a test for arm + virt) WARNING: line over 80 characters #48: FILE: tests/acceptance/boot_linux_console.py:190: +kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0' total: 0 errors, 1 warnings, 30 lines checked Patch 18/20 has style
Re: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support
Patchew URL: https://patchew.org/QEMU/20190202005610.24048-1-cr...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190202005610.24048-1-cr...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/20] Acceptance Tests: target architecture support === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20190202005610.24048-1-cr...@redhat.com -> patchew/20190202005610.24048-1-cr...@redhat.com * [new tag] patchew/20190202011048.12343-1-js...@redhat.com -> patchew/20190202011048.12343-1-js...@redhat.com * [new tag] patchew/20190202072456.6468-1-yang.zh...@intel.com -> patchew/20190202072456.6468-1-yang.zh...@intel.com Switched to a new branch 'test' 6655fa7 Boot Linux Console Test: add a test for alpha + clipper f6dd48f Boot Linux Console Test: add a test for s390x + s390-ccw-virtio 018f196 Boot Linux Console Test: add a test for arm + virt 1b3a235 Boot Linux Console Test: add a test for aarch64 + virt a72b513 Boot Linux Console Test: add a test for ppc64 + pseries 53b6bd6 Boot Linux Console Test: add a test for mips64el + malta 9e99bc7 Boot Linux Console Test: add a test for mips + malta ad537d2 scripts/qemu.py: support adding a console with the default serial device a90473b Boot Linux Console Test: refactor the console watcher into utility method 31e1e8e Boot Linux Console Test: increase timeout 71fd9a8 Boot Linux Console Test: add common kernel command line options 1f01854 Boot Linux Console Test: update the x86_64 kernel fd958ac Boot Linux Console Test: rename the x86_64 after the arch and machine 5353486 Acceptance tests: look for target architecture in test tags first 0eec679 Acceptance tests: use "arch:" tag to filter target specific tests d8bdead Acceptance tests: introduce arch parameter and attribute 68ac450 Acceptance tests: fix doc reference to avocado_qemu directory 4ef4e6b Acceptance tests: improve docstring on pick_default_qemu_bin() 9255bba Acceptance tests: show avocado test execution by default 3401845 scripts/qemu.py: log QEMU launch command line === OUTPUT BEGIN === 1/20 Checking commit 3401845f7eb9 (scripts/qemu.py: log QEMU launch command line) 2/20 Checking commit 9255bba791a8 (Acceptance tests: show avocado test execution by default) 3/20 Checking commit 4ef4e6bab129 (Acceptance tests: improve docstring on pick_default_qemu_bin()) 4/20 Checking commit 68ac450c2b81 (Acceptance tests: fix doc reference to avocado_qemu directory) 5/20 Checking commit d8bdead7f506 (Acceptance tests: introduce arch parameter and attribute) 6/20 Checking commit 0eec679cae2b (Acceptance tests: use "arch:" tag to filter target specific tests) 7/20 Checking commit 5353486417ba (Acceptance tests: look for target architecture in test tags first) 8/20 Checking commit fd958acfdb06 (Boot Linux Console Test: rename the x86_64 after the arch and machine) 9/20 Checking commit 1f018544557b (Boot Linux Console Test: update the x86_64 kernel) 10/20 Checking commit 71fd9a85460e (Boot Linux Console Test: add common kernel command line options) 11/20 Checking commit 31e1e8e772d2 (Boot Linux Console Test: increase timeout) 12/20 Checking commit a90473b9e34b (Boot Linux Console Test: refactor the console watcher into utility method) 13/20 Checking commit ad537d2fcc3d (scripts/qemu.py: support adding a console with the default serial device) 14/20 Checking commit 9e99bc7ca7b3 (Boot Linux Console Test: add a test for mips + malta) 15/20 Checking commit 53b6bd6a83fb (Boot Linux Console Test: add a test for mips64el + malta) ERROR: line over 90 characters #61: FILE: tests/acceptance/boot_linux_console.py:116: +[1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/#linux-source-2.6.32_2.6.32-48 ERROR: line over 90 characters #62: FILE: tests/acceptance/boot_linux_console.py:117: +[2] https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official total: 2 errors, 0 warnings, 49 lines checked Patch 15/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 16/20 Checking commit a72b513a0156 (Boot Linux Console Test: add a test for ppc64 + pseries) 17/20 Checking commit 1b3a2357bc57 (Boot Linux Console Test: add a test for aarch64 + virt) WARNING: line over 80 characters #51: FILE: tests/acceptance/boot_linux_console.py:170: +kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0' total: 0 errors, 1 warnings, 31 lines checked Patch 17/20 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
Re: [Qemu-devel] [PATCH] hw/arm/nrf51_soc: set object owner in memory_region_init_ram
Patchew URL: https://patchew.org/QEMU/20190125155630.17430-1-sourav.jb1...@gmail.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === Configure options: --enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=2.0 ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not work # QEMU configure log Sat Feb 2 19:09:42 UTC 2019 # Configured with: '/tmp/qemu-test/src/configure' '--enable-werror' '--target-list=x86_64-softmmu,aarch64-softmmu' '--prefix=/tmp/qemu-test/install' '--python=/usr/bin/python3' '--cross-prefix=x86_64-w64-mingw32-' '--enable-trace-backends=simple' '--enable-gnutls' '--enable-nettle' '--enable-curl' '--enable-vnc' '--enable-bzip2' '--enable-guest-agent' '--with-sdlabi=2.0' --- funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 636 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 638 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 640 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 642 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 644 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 646 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 648 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 650 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc
Re: [Qemu-devel] [RFC PATCH] gdbstub: Avoid NULL dereference in gdb_handle_packet()
Patchew URL: https://patchew.org/QEMU/20190118112213.11173-1-phi...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === CC x86_64-softmmu/memory.o CC x86_64-softmmu/memory_mapping.o /tmp/qemu-test/src/gdbstub.c: In function 'gdb_handle_packet': /tmp/qemu-test/src/gdbstub.c:1440:17: error: 'GDBState' {aka 'struct GDBState'} has no member named 's_cpu'; did you mean 'c_cpu'? if (!s->s_cpu) { ^ c_cpu /tmp/qemu-test/src/gdbstub.c:1456:21: error: 'GDBState' {aka 'struct GDBState'} has no member named 's_cpu'; did you mean 'c_cpu'? if (!s->s_cpu) { ^ c_cpu --- CC aarch64-softmmu/memory.o CC aarch64-softmmu/memory_mapping.o /tmp/qemu-test/src/gdbstub.c: In function 'gdb_handle_packet': /tmp/qemu-test/src/gdbstub.c:1440:17: error: 'GDBState' {aka 'struct GDBState'} has no member named 's_cpu'; did you mean 'c_cpu'? if (!s->s_cpu) { ^ c_cpu /tmp/qemu-test/src/gdbstub.c:1456:21: error: 'GDBState' {aka 'struct GDBState'} has no member named 's_cpu'; did you mean 'c_cpu'? if (!s->s_cpu) { ^ c_cpu The full log is available at http://patchew.org/logs/20190118112213.11173-1-phi...@redhat.com/testing.docker-mingw@fedora/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@redhat.com
Re: [Qemu-devel] [PATCH v2 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
Le 31/01/2019 à 14:53, Thomas Huth a écrit : Select the required devices in hw/ppc/Kconfig instead, so that ppc-softmmu.mak only contains the user-selectable PREP switch. Plug-in devices like NE2000_ISA are pulled in automatically by the Kconfig build system now. Cc: Hervé Poussineau Signed-off-by: Thomas Huth --- default-configs/ppc-softmmu.mak | 8 hw/ppc/Kconfig | 8 2 files changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Hervé Poussineau
Re: [Qemu-devel] [PATCH] hw/virtio: Use CONFIG_VIRTIO_PCI switch instead of CONFIG_PCI
Patchew URL: https://patchew.org/QEMU/1548420960--1-git-send-email-th...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === Configure options: --enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=2.0 ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not work # QEMU configure log Sat Feb 2 16:30:01 UTC 2019 # Configured with: '/tmp/qemu-test/src/configure' '--enable-werror' '--target-list=x86_64-softmmu,aarch64-softmmu' '--prefix=/tmp/qemu-test/install' '--python=/usr/bin/python3' '--cross-prefix=x86_64-w64-mingw32-' '--enable-trace-backends=simple' '--enable-gnutls' '--enable-nettle' '--enable-curl' '--enable-vnc' '--enable-bzip2' '--enable-guest-agent' '--with-sdlabi=2.0' --- funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 636 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 638 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 640 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 642 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 644 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 646 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 648 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc compile_object check_define main lines: 92 122 619 650 0 x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c ccache: error: Failed to create temporary file for /var/tmp/ccache/tmp/qemu-conf.stdout: Permission denied funcs: do_compiler do_cc
Re: [Qemu-devel] [PATCH] hax: Support for Linux hosts
On 25.11.2018 18:14, Paolo Bonzini wrote: > On 25/11/18 00:50, Kamil Rytarowski wrote: >> On 22.11.2018 08:24, Kamil Rytarowski wrote: >>> On 16.11.2018 13:52, Paolo Bonzini wrote: On 14/11/18 14:04, Alexandro Sanchez Bach wrote: > Intel HAXM supports now 32-bit and 64-bit Linux hosts. This patch includes > the corresponding userland changes. > > Since the Darwin userland backend is POSIX-compliant, the hax-darwin.{c,h} > files have been renamed to hax-posix.{c,h}. This prefix is consistent with > the naming used in the rest of QEMU. What's the advantage of HAXM when Linux hosts can just run KVM? I guess avoiding bitrot? Paolo >>> >>> This patch is also useful for NetBSD, even if it's not a Linux host. >>> There is a driver in progress again (thanks to the newly added Linux >>> port, it's now much easier to get done). >>> >>> I recommend to merge this patch. >>> >> >> For the record, I've a functional version of HAXM for NetBSD as host. >> Once you will merge this patch, I will submit another one to configure >> to enable haxm for NetBSD. >> >> I need to keep the patch by Alexandro in a local copy of qemu. > > Sure, it will be accepted for the release after 3.1. > > Paolo > > I've pushed the haxm patch for NetBSD through qemu-trivial. https://lists.gnu.org/archive/html/qemu-trivial/2019-01/msg00161.html A proof that it is usable: http://blog.netbsd.org/tnf/entry/the_hardware_assisted_virtualization_challenge signature.asc Description: OpenPGP digital signature
[Qemu-devel] [PATCH] target-i386: Enhance the stub for kvm_arch_get_supported_cpuid()
This improves the commit: "target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()" r. 2140cfa51d59177815f5b82e94ac48fb24909aba Clang/LLVM on NetBSD with enabled optimization cannot link correct qemu program because of a missing symbol of kvm_arch_get_supported_cpuid() in kvm-stubs.o used by executables. There are more than a single one kvm-stub.c and several types of possible programs such as bsd-user ones. the previous workaround does not work reliably for all use-cases. Instead of reworking the stubs and linking rules, move the workaround from a code that depends on the __OPTIMIZE__ builtin compiler flag, build option (KVM), compiler and arrangement of linking rules to a simple macro in a shared header with all the users that defines fallback dummy implementation, ignoring whether it is optimized out or not. Signed-off-by: Kamil Rytarowski --- include/sysemu/kvm.h | 13 + target/i386/kvm-stub.c | 10 -- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index a6d1cd190f..93d3c0f0b3 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -459,8 +459,21 @@ int kvm_vm_check_extension(KVMState *s, unsigned int extension); kvm_vcpu_ioctl(cpu, KVM_ENABLE_CAP, ); \ }) +#ifdef CONFIG_KVM uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, uint32_t index, int reg); +#else +/* + * This function is only called inside conditionals which we + * rely on the compiler to optimize out when CONFIG_KVM is not + * defined. + */ +#define kvm_arch_get_supported_cpuid(a, b, c, d) \ +({ \ +abort(); \ +0; \ +}) +#endif uint32_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index); diff --git a/target/i386/kvm-stub.c b/target/i386/kvm-stub.c index e7a673e5db..9ce8566700 100644 --- a/target/i386/kvm-stub.c +++ b/target/i386/kvm-stub.c @@ -29,16 +29,6 @@ bool kvm_enable_x2apic(void) { return false; } - -/* This function is only called inside conditionals which we - * rely on the compiler to optimize out when CONFIG_KVM is not - * defined. - */ -uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, - uint32_t index, int reg) -{ -abort(); -} #endif bool kvm_hv_vpindex_settable(void) -- 2.20.1
Re: [Qemu-devel] [PATCH 00/10] Misc fixes to pvrdma device
Patchew URL: https://patchew.org/QEMU/20190131130850.6850-1-yuval.sh...@oracle.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END === CC x86_64-softmmu/exec.o In file included from /tmp/qemu-test/src/hw/rdma/vmw/pvrdma.h:26, from /tmp/qemu-test/src/monitor.c:87: /tmp/qemu-test/src/hw/rdma/vmw/../rdma_backend_defs.h:21:10: fatal error: infiniband/verbs.h: No such file or directory #include ^~~~ compilation terminated. --- CC x86_64-softmmu/memory.o In file included from /tmp/qemu-test/src/hw/rdma/vmw/pvrdma.h:26, from /tmp/qemu-test/src/monitor.c:87: /tmp/qemu-test/src/hw/rdma/vmw/../rdma_backend_defs.h:21:10: fatal error: infiniband/verbs.h: No such file or directory #include ^~~~ compilation terminated. The full log is available at http://patchew.org/logs/20190131130850.6850-1-yuval.sh...@oracle.com/testing.docker-mingw@fedora/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@redhat.com
[Qemu-devel] [Bug 1814381] Re: qemu can't resolve ::1 when no network is available
The logic in util/qemu-sockets.c is very complicated, containing workarounds for all sorts of broken/obsolete GAI implementations, so it's hard to tell what's going on there. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814381 Title: qemu can't resolve ::1 when no network is available Status in QEMU: New Bug description: I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or even just something about my laptop. However we have a test failure in nbdkit which only occurs when my laptop is not connected to wifi or other networking. It boils down to: $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': address resolution failed for ::1:1234: Address family for hostname not supported In a successful case it should connect to a local NBD server on port 1234, but if you don't have that you will see: qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': Failed to connect socket: Connection refused I can ‘ping6 ::1’ fine. It also works if I replace ‘::1’ with ‘localhost6’. My /etc/hosts contains: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1814381/+subscriptions
[Qemu-devel] [Bug 1814381] Re: qemu can't resolve ::1 when no network is available
ping6 output when the network is not connected: $ ping6 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.082 ms 64 bytes from ::1: icmp_seq=2 ttl=64 time=0.092 ms 64 bytes from ::1: icmp_seq=3 ttl=64 time=0.089 ms ^C --- ::1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 55ms rtt min/avg/max/mdev = 0.082/0.087/0.092/0.011 ms -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814381 Title: qemu can't resolve ::1 when no network is available Status in QEMU: New Bug description: I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or even just something about my laptop. However we have a test failure in nbdkit which only occurs when my laptop is not connected to wifi or other networking. It boils down to: $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': address resolution failed for ::1:1234: Address family for hostname not supported In a successful case it should connect to a local NBD server on port 1234, but if you don't have that you will see: qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': Failed to connect socket: Connection refused I can ‘ping6 ::1’ fine. It also works if I replace ‘::1’ with ‘localhost6’. My /etc/hosts contains: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1814381/+subscriptions
[Qemu-devel] [Bug 1814381] Re: qemu can't resolve ::1 when no network is available
ip output when the network is not connected: $ ip a show scope host 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s31f6: mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 link/ether e8:6a:64:5d:2c:66 brd ff:ff:ff:ff:ff:ff 3: wlp61s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 1e:2b:b1:0c:99:ef brd ff:ff:ff:ff:ff:ff 5: virbr0-nic: mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000 link/ether 52:54:00:72:04:db brd ff:ff:ff:ff:ff:ff ** Description changed: I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or even just something about my laptop. However we have a test failure in nbdkit which only occurs when my laptop is not connected to wifi or other networking. It boils down to: - $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" - qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': addre - ss resolution failed for ::1:1234: Address family for hostname not supported + $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" + qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': address resolution failed for ::1:1234: Address family for hostname not supported In a successful case it should connect to a local NBD server on port 1234, but if you don't have that you will see: - qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': Faile - d to connect socket: Connection refused + qemu-img: Could not open + 'file.driver=nbd,file.host=::1,file.port=1234': Failed to connect + socket: Connection refused I can ‘ping6 ::1’ fine. It also works if I replace ‘::1’ with ‘localhost6’. My /etc/hosts contains: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814381 Title: qemu can't resolve ::1 when no network is available Status in QEMU: New Bug description: I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or even just something about my laptop. However we have a test failure in nbdkit which only occurs when my laptop is not connected to wifi or other networking. It boils down to: $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': address resolution failed for ::1:1234: Address family for hostname not supported In a successful case it should connect to a local NBD server on port 1234, but if you don't have that you will see: qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': Failed to connect socket: Connection refused I can ‘ping6 ::1’ fine. It also works if I replace ‘::1’ with ‘localhost6’. My /etc/hosts contains: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1814381/+subscriptions
[Qemu-devel] [Bug 1814381] [NEW] qemu can't resolve ::1 when no network is available
Public bug reported: I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or even just something about my laptop. However we have a test failure in nbdkit which only occurs when my laptop is not connected to wifi or other networking. It boils down to: $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': address resolution failed for ::1:1234: Address family for hostname not supported In a successful case it should connect to a local NBD server on port 1234, but if you don't have that you will see: qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': Failed to connect socket: Connection refused I can ‘ping6 ::1’ fine. It also works if I replace ‘::1’ with ‘localhost6’. My /etc/hosts contains: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814381 Title: qemu can't resolve ::1 when no network is available Status in QEMU: New Bug description: I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or even just something about my laptop. However we have a test failure in nbdkit which only occurs when my laptop is not connected to wifi or other networking. It boils down to: $ qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=1234" qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': address resolution failed for ::1:1234: Address family for hostname not supported In a successful case it should connect to a local NBD server on port 1234, but if you don't have that you will see: qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': Failed to connect socket: Connection refused I can ‘ping6 ::1’ fine. It also works if I replace ‘::1’ with ‘localhost6’. My /etc/hosts contains: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1814381/+subscriptions
Re: [Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments
no-re...@patchew.org writes: > === OUTPUT BEGIN === > 1/8 Checking commit 345a0718e21e (Update linux headers (5.0-rc2)) > WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > #1646: > new file mode 100644 > > ERROR: code indent should never use tabs > #3980: FILE: scripts/update-linux-headers.sh:126: > +^Icp "$tmpdir/include/asm/unistd_n64.h" "$output/linux-headers/asm-mips/"$ > > WARNING: line over 80 characters > #3983: FILE: scripts/update-linux-headers.sh:129: > +cp "$tmpdir/include/asm/unistd_32.h" > "$output/linux-headers/asm-powerpc/" > > WARNING: line over 80 characters > #3984: FILE: scripts/update-linux-headers.sh:130: > + cp "$tmpdir/include/asm/unistd_64.h" > "$output/linux-headers/asm-powerpc/" > > ERROR: code indent should never use tabs > #3984: FILE: scripts/update-linux-headers.sh:130: > +^Icp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/"$ > I saw these before submitting, however, these are linux headers and we take them as-is with scripts/update-linux-headers.sh: I don't think it is worth it to modify these headers just to silence patchew. -- Vitaly
Re: [Qemu-devel] [Qemu-ppc] qemu_vga.drv missing 256 colors support
> On Jan 31, 2019, at 7:49 AM, Howard Spoelstra wrote: > > > > On Thu, Jan 31, 2019 at 12:12 PM Programmingkid > wrote: > After testing a recent commit of QEMU I noticed that 256 color support is > missing in Mac OS 9's color options. A lot of games refuse to run without > being able to set the monitor to 256 colors. Could we have this option added? > > Thank you. > > Hi, > > An updated vga driver that supports 256 colours and reads edid info has been > committed to dgibson's ppc-for-4.0 branch: > https://github.com/dgibson/qemu/commit/4c693a81dbab9cecbf101c4c24e4b8af819df46c Thank you very much for this info. I did notice the 256 colors option was back with this new driver. I didn't notice any change with the number of resolutions available. Were you able to see new resolution options?
[Qemu-devel] [PATCH] char: allow specifying a GMainContext at opening time
This will be needed by vhost-user-test, when each test switches to its own GMainLoop and GMainContext. Otherwise, for a reconnecting socket the initial connection will happen on the default GMainContext, and no one will be listening on it. Signed-off-by: Paolo Bonzini Based-on: <1544684731-18828-1-git-send-email-th...@redhat.com> --- chardev/char.c | 30 +++- gdbstub.c | 4 ++-- hmp.c | 2 +- hw/arm/omap2.c | 2 +- hw/bt/hci-csr.c | 2 +- hw/char/omap_uart.c | 4 ++-- hw/char/xen_console.c | 3 ++- hw/isa/isa-superio.c| 4 ++-- hw/mips/boston.c| 2 +- hw/mips/mips_malta.c| 2 +- hw/usb/dev-serial.c | 2 +- include/chardev/char.h | 16 +++ net/slirp.c | 2 +- qtest.c | 2 +- tests/test-char.c | 43 + tests/vhost-user-test.c | 2 +- vl.c| 8 17 files changed, 72 insertions(+), 58 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index ccba36bafb..71ac061f62 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -634,7 +634,8 @@ ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, Error **errp) return backend; } -Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) +Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context, +Error **errp) { const ChardevClass *cc; Chardev *chr = NULL; @@ -674,7 +675,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) chr = qemu_chardev_new(bid ? bid : id, object_class_get_name(OBJECT_CLASS(cc)), - backend, errp); + backend, context, errp); if (chr == NULL) { goto out; @@ -687,7 +688,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) backend->type = CHARDEV_BACKEND_KIND_MUX; backend->u.mux.data = g_new0(ChardevMux, 1); backend->u.mux.data->chardev = g_strdup(bid); -mux = qemu_chardev_new(id, TYPE_CHARDEV_MUX, backend, errp); +mux = qemu_chardev_new(id, TYPE_CHARDEV_MUX, backend, context, errp); if (mux == NULL) { object_unparent(OBJECT(chr)); chr = NULL; @@ -703,7 +704,7 @@ out: } Chardev *qemu_chr_new_noreplay(const char *label, const char *filename, - bool permit_mux_mon) + bool permit_mux_mon, GMainContext *context) { const char *p; Chardev *chr; @@ -718,7 +719,7 @@ Chardev *qemu_chr_new_noreplay(const char *label, const char *filename, if (!opts) return NULL; -chr = qemu_chr_new_from_opts(opts, ); +chr = qemu_chr_new_from_opts(opts, context, ); if (!chr) { error_report_err(err); goto out; @@ -736,10 +737,11 @@ out: static Chardev *qemu_chr_new_permit_mux_mon(const char *label, const char *filename, - bool permit_mux_mon) + bool permit_mux_mon, + GMainContext *context) { Chardev *chr; -chr = qemu_chr_new_noreplay(label, filename, permit_mux_mon); +chr = qemu_chr_new_noreplay(label, filename, permit_mux_mon, context); if (chr) { if (replay_mode != REPLAY_MODE_NONE) { qemu_chr_set_feature(chr, QEMU_CHAR_FEATURE_REPLAY); @@ -753,14 +755,14 @@ static Chardev *qemu_chr_new_permit_mux_mon(const char *label, return chr; } -Chardev *qemu_chr_new(const char *label, const char *filename) +Chardev *qemu_chr_new(const char *label, const char *filename, GMainContext *context) { -return qemu_chr_new_permit_mux_mon(label, filename, false); +return qemu_chr_new_permit_mux_mon(label, filename, false, context); } -Chardev *qemu_chr_new_mux_mon(const char *label, const char *filename) +Chardev *qemu_chr_new_mux_mon(const char *label, const char *filename, GMainContext *context) { -return qemu_chr_new_permit_mux_mon(label, filename, true); +return qemu_chr_new_permit_mux_mon(label, filename, true, context); } static int qmp_query_chardev_foreach(Object *obj, void *data) @@ -935,6 +937,7 @@ void qemu_chr_set_feature(Chardev *chr, Chardev *qemu_chardev_new(const char *id, const char *typename, ChardevBackend *backend, + GMainContext *gcontext, Error **errp) { Object *obj; @@ -947,6 +950,7 @@ Chardev *qemu_chardev_new(const char *id, const char *typename, obj = object_new(typename); chr = CHARDEV(obj); chr->label = g_strdup(id); +chr->gcontext = gcontext; qemu_char_open(chr, backend, _opened, _err); if (local_err) { @@ -991,7 +995,7 @@ ChardevReturn *qmp_chardev_add(const char *id,
[Qemu-devel] [PATCH] char: allow specifying a GMainContext at opening time
This will be needed by vhost-user-test, when each test switches to its own GMainLoop and GMainContext. Otherwise, for a reconnecting socket the initial connection will happen on the default GMainContext, and no one will be listening on it. Signed-off-by: Paolo Bonzini Based-on: <1544684731-18828-1-git-send-email-th...@redhat.com> --- chardev/char.c | 30 +++- gdbstub.c | 4 ++-- hmp.c | 2 +- hw/arm/omap2.c | 2 +- hw/bt/hci-csr.c | 2 +- hw/char/omap_uart.c | 4 ++-- hw/char/xen_console.c | 3 ++- hw/isa/isa-superio.c| 4 ++-- hw/mips/boston.c| 2 +- hw/mips/mips_malta.c| 2 +- hw/usb/dev-serial.c | 2 +- include/chardev/char.h | 16 +++ net/slirp.c | 2 +- qtest.c | 2 +- tests/test-char.c | 43 + tests/vhost-user-test.c | 2 +- vl.c| 8 17 files changed, 72 insertions(+), 58 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index ccba36bafb..71ac061f62 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -634,7 +634,8 @@ ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, Error **errp) return backend; } -Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) +Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context, +Error **errp) { const ChardevClass *cc; Chardev *chr = NULL; @@ -674,7 +675,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) chr = qemu_chardev_new(bid ? bid : id, object_class_get_name(OBJECT_CLASS(cc)), - backend, errp); + backend, context, errp); if (chr == NULL) { goto out; @@ -687,7 +688,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) backend->type = CHARDEV_BACKEND_KIND_MUX; backend->u.mux.data = g_new0(ChardevMux, 1); backend->u.mux.data->chardev = g_strdup(bid); -mux = qemu_chardev_new(id, TYPE_CHARDEV_MUX, backend, errp); +mux = qemu_chardev_new(id, TYPE_CHARDEV_MUX, backend, context, errp); if (mux == NULL) { object_unparent(OBJECT(chr)); chr = NULL; @@ -703,7 +704,7 @@ out: } Chardev *qemu_chr_new_noreplay(const char *label, const char *filename, - bool permit_mux_mon) + bool permit_mux_mon, GMainContext *context) { const char *p; Chardev *chr; @@ -718,7 +719,7 @@ Chardev *qemu_chr_new_noreplay(const char *label, const char *filename, if (!opts) return NULL; -chr = qemu_chr_new_from_opts(opts, ); +chr = qemu_chr_new_from_opts(opts, context, ); if (!chr) { error_report_err(err); goto out; @@ -736,10 +737,11 @@ out: static Chardev *qemu_chr_new_permit_mux_mon(const char *label, const char *filename, - bool permit_mux_mon) + bool permit_mux_mon, + GMainContext *context) { Chardev *chr; -chr = qemu_chr_new_noreplay(label, filename, permit_mux_mon); +chr = qemu_chr_new_noreplay(label, filename, permit_mux_mon, context); if (chr) { if (replay_mode != REPLAY_MODE_NONE) { qemu_chr_set_feature(chr, QEMU_CHAR_FEATURE_REPLAY); @@ -753,14 +755,14 @@ static Chardev *qemu_chr_new_permit_mux_mon(const char *label, return chr; } -Chardev *qemu_chr_new(const char *label, const char *filename) +Chardev *qemu_chr_new(const char *label, const char *filename, GMainContext *context) { -return qemu_chr_new_permit_mux_mon(label, filename, false); +return qemu_chr_new_permit_mux_mon(label, filename, false, context); } -Chardev *qemu_chr_new_mux_mon(const char *label, const char *filename) +Chardev *qemu_chr_new_mux_mon(const char *label, const char *filename, GMainContext *context) { -return qemu_chr_new_permit_mux_mon(label, filename, true); +return qemu_chr_new_permit_mux_mon(label, filename, true, context); } static int qmp_query_chardev_foreach(Object *obj, void *data) @@ -935,6 +937,7 @@ void qemu_chr_set_feature(Chardev *chr, Chardev *qemu_chardev_new(const char *id, const char *typename, ChardevBackend *backend, + GMainContext *gcontext, Error **errp) { Object *obj; @@ -947,6 +950,7 @@ Chardev *qemu_chardev_new(const char *id, const char *typename, obj = object_new(typename); chr = CHARDEV(obj); chr->label = g_strdup(id); +chr->gcontext = gcontext; qemu_char_open(chr, backend, _opened, _err); if (local_err) { @@ -991,7 +995,7 @@ ChardevReturn *qmp_chardev_add(const char *id,
[Qemu-devel] [PULL 04/10] RISC-V: Use riscv prefix consistently on cpu helpers
From: Michael Clark * Add riscv prefix to raise_exception function * Add riscv prefix to CSR read/write functions * Add riscv prefix to signal handler function * Add riscv prefix to get fflags function * Remove redundant declaration of riscv_cpu_init and rename cpu_riscv_init to riscv_cpu_init * rename riscv_set_mode to riscv_cpu_set_mode Signed-off-by: Michael Clark Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Palmer Dabbelt --- linux-user/riscv/signal.c | 4 ++-- target/riscv/cpu.h| 21 ++--- target/riscv/cpu_helper.c | 10 +- target/riscv/csr.c| 8 target/riscv/fpu_helper.c | 6 +++--- target/riscv/op_helper.c | 28 ++-- 6 files changed, 38 insertions(+), 39 deletions(-) diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c index f598d41891c1..83ecc6f799a1 100644 --- a/linux-user/riscv/signal.c +++ b/linux-user/riscv/signal.c @@ -83,7 +83,7 @@ static void setup_sigcontext(struct target_sigcontext *sc, CPURISCVState *env) __put_user(env->fpr[i], >fpr[i]); } -uint32_t fcsr = csr_read_helper(env, CSR_FCSR); /*riscv_get_fcsr(env);*/ +uint32_t fcsr = riscv_csr_read(env, CSR_FCSR); __put_user(fcsr, >fcsr); } @@ -159,7 +159,7 @@ static void restore_sigcontext(CPURISCVState *env, struct target_sigcontext *sc) uint32_t fcsr; __get_user(fcsr, >fcsr); -csr_write_helper(env, fcsr, CSR_FCSR); +riscv_csr_write(env, CSR_FCSR, fcsr); } static void restore_ucontext(CPURISCVState *env, struct target_ucontext *uc) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 681341f5d5a4..a97435bd7b1d 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -256,7 +256,7 @@ int riscv_cpu_handle_mmu_fault(CPUState *cpu, vaddr address, int size, char *riscv_isa_string(RISCVCPU *cpu); void riscv_cpu_list(FILE *f, fprintf_function cpu_fprintf); -#define cpu_signal_handler cpu_riscv_signal_handler +#define cpu_signal_handler riscv_cpu_signal_handler #define cpu_list riscv_cpu_list #define cpu_mmu_index riscv_cpu_mmu_index @@ -264,16 +264,15 @@ void riscv_cpu_list(FILE *f, fprintf_function cpu_fprintf); uint32_t riscv_cpu_update_mip(RISCVCPU *cpu, uint32_t mask, uint32_t value); #define BOOL_TO_MASK(x) (-!!(x)) /* helper for riscv_cpu_update_mip value */ #endif -void riscv_set_mode(CPURISCVState *env, target_ulong newpriv); +void riscv_cpu_set_mode(CPURISCVState *env, target_ulong newpriv); void riscv_translate_init(void); -RISCVCPU *cpu_riscv_init(const char *cpu_model); -int cpu_riscv_signal_handler(int host_signum, void *pinfo, void *puc); -void QEMU_NORETURN do_raise_exception_err(CPURISCVState *env, - uint32_t exception, uintptr_t pc); +int riscv_cpu_signal_handler(int host_signum, void *pinfo, void *puc); +void QEMU_NORETURN riscv_raise_exception(CPURISCVState *env, + uint32_t exception, uintptr_t pc); -target_ulong cpu_riscv_get_fflags(CPURISCVState *env); -void cpu_riscv_set_fflags(CPURISCVState *env, target_ulong); +target_ulong riscv_cpu_get_fflags(CPURISCVState *env); +void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong); #define TB_FLAGS_MMU_MASK 3 #define TB_FLAGS_MSTATUS_FS MSTATUS_FS @@ -293,13 +292,13 @@ static inline void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc, int riscv_csrrw(CPURISCVState *env, int csrno, target_ulong *ret_value, target_ulong new_value, target_ulong write_mask); -static inline void csr_write_helper(CPURISCVState *env, target_ulong val, -int csrno) +static inline void riscv_csr_write(CPURISCVState *env, int csrno, + target_ulong val) { riscv_csrrw(env, csrno, NULL, val, MAKE_64BIT_MASK(0, TARGET_LONG_BITS)); } -static inline target_ulong csr_read_helper(CPURISCVState *env, int csrno) +static inline target_ulong riscv_csr_read(CPURISCVState *env, int csrno) { target_ulong val = 0; riscv_csrrw(env, csrno, , 0, 0); diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index f257050f1282..f49e98ed594b 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -93,7 +93,7 @@ uint32_t riscv_cpu_update_mip(RISCVCPU *cpu, uint32_t mask, uint32_t value) return old; } -void riscv_set_mode(CPURISCVState *env, target_ulong newpriv) +void riscv_cpu_set_mode(CPURISCVState *env, target_ulong newpriv) { if (newpriv > PRV_M) { g_assert_not_reached(); @@ -366,7 +366,7 @@ void riscv_cpu_do_unaligned_access(CPUState *cs, vaddr addr, g_assert_not_reached(); } env->badaddr = addr; -do_raise_exception_err(env, cs->exception_index, retaddr); +riscv_raise_exception(env, cs->exception_index, retaddr); } /* called by qemu's softmmu to fill the qemu tlb */ @@ -378,7 +378,7 @@ void tlb_fill(CPUState *cs,
[Qemu-devel] [PULL 09/10] MAINTAINERS: Remove Michael Clark as a RISC-V Maintainer
Michael is no longer employed by SiFive and does not want to continue maintianing the RISC-V port. Signed-off-by: Palmer Dabbelt --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index af339b86db76..47cb3c14298e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -259,7 +259,6 @@ F: include/hw/ppc/ F: disas/ppc.c RISC-V -M: Michael Clark M: Palmer Dabbelt M: Alistair Francis M: Sagar Karandikar -- 2.18.1
[Qemu-devel] [PULL 01/10] RISC-V: Split out mstatus_fs from tb_flags
From: Richard Henderson Signed-off-by: Michael Clark Reviewed-by: Michael Clark Signed-off-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.h | 6 +++--- target/riscv/translate.c | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 743f02c8b95a..681341f5d5a4 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -275,8 +275,8 @@ void QEMU_NORETURN do_raise_exception_err(CPURISCVState *env, target_ulong cpu_riscv_get_fflags(CPURISCVState *env); void cpu_riscv_set_fflags(CPURISCVState *env, target_ulong); -#define TB_FLAGS_MMU_MASK 3 -#define TB_FLAGS_FP_ENABLE MSTATUS_FS +#define TB_FLAGS_MMU_MASK 3 +#define TB_FLAGS_MSTATUS_FS MSTATUS_FS static inline void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc, target_ulong *cs_base, uint32_t *flags) @@ -284,7 +284,7 @@ static inline void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc, *pc = env->pc; *cs_base = 0; #ifdef CONFIG_USER_ONLY -*flags = TB_FLAGS_FP_ENABLE; +*flags = TB_FLAGS_MSTATUS_FS; #else *flags = cpu_mmu_index(env, 0) | (env->mstatus & MSTATUS_FS); #endif diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 312bf298b3c2..3d07d651b60c 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -44,7 +44,7 @@ typedef struct DisasContext { /* pc_succ_insn points to the instruction following base.pc_next */ target_ulong pc_succ_insn; uint32_t opcode; -uint32_t flags; +uint32_t mstatus_fs; uint32_t mem_idx; /* Remember the rounding mode encoded in the previous fp instruction, which we have already installed into env->fp_status. Or -1 for @@ -656,7 +656,7 @@ static void gen_fp_load(DisasContext *ctx, uint32_t opc, int rd, { TCGv t0; -if (!(ctx->flags & TB_FLAGS_FP_ENABLE)) { +if (ctx->mstatus_fs == 0) { gen_exception_illegal(ctx); return; } @@ -686,7 +686,7 @@ static void gen_fp_store(DisasContext *ctx, uint32_t opc, int rs1, { TCGv t0; -if (!(ctx->flags & TB_FLAGS_FP_ENABLE)) { +if (ctx->mstatus_fs == 0) { gen_exception_illegal(ctx); return; } @@ -945,7 +945,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, { TCGv t0 = NULL; -if (!(ctx->flags & TB_FLAGS_FP_ENABLE)) { +if (ctx->mstatus_fs == 0) { goto do_illegal; } @@ -1818,8 +1818,8 @@ static void riscv_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) DisasContext *ctx = container_of(dcbase, DisasContext, base); ctx->pc_succ_insn = ctx->base.pc_first; -ctx->flags = ctx->base.tb->flags; ctx->mem_idx = ctx->base.tb->flags & TB_FLAGS_MMU_MASK; +ctx->mstatus_fs = ctx->base.tb->flags & TB_FLAGS_MSTATUS_FS; ctx->frm = -1; /* unknown rounding mode */ } -- 2.18.1
[Qemu-devel] [PULL] RISC-V Patches for 3.2, Part 3
The following changes since commit 5385a5988c8a55bebdc878c05b96648579b5d6e0: hw/virtio/virtio-balloon: zero-initialize the virtio_balloon_config struct (2019-01-21 17:20:36 +) are available in the Git repository at: git://github.com/palmer-dabbelt/qemu.git tags/riscv-for-master-3.2-part3 for you to fetch changes up to 461ab9de46d085a37b0da6f096aadc4e0dda4d4c: target/riscv: fix counter-enable checks in ctr() (2019-01-29 11:33:38 -0800) RISC-V Patches for 3.2, Part 3 This patch set contains a handful of patches I've collected over the last few weeks. There's nothing really fundamental, but I thought it would be good to send these out now as there are some other patch sets on the mailing list that are getting ready to go. As far as the actual patches, there's: * A set that cleans up our FS dirty-mode handling. * Support for writing MISA. * The removal of Michael as a maintainer. * A fix to {m,s}counteren handling. This passes my standard "boots Fedora" test case. Alistair Francis (1): RISC-V: Add priv_ver to DisasContext Michael Clark (5): RISC-V: Implement mstatus.TSR/TW/TVM RISC-V: Use riscv prefix consistently on cpu helpers RISC-V: Add misa to DisasContext RISC-V: Add misa.MAFD checks to translate RISC-V: Add misa runtime write support Palmer Dabbelt (1): MAINTAINERS: Remove Michael Clark as a RISC-V Maintainer Richard Henderson (2): RISC-V: Split out mstatus_fs from tb_flags RISC-V: Mark mstatus.fs dirty Xi Wang (1): target/riscv: fix counter-enable checks in ctr() MAINTAINERS | 1 - linux-user/riscv/signal.c | 4 +- target/riscv/cpu.c| 2 +- target/riscv/cpu.h| 31 ++--- target/riscv/cpu_bits.h | 11 ++ target/riscv/cpu_helper.c | 10 +- target/riscv/csr.c| 103 target/riscv/fpu_helper.c | 6 +- target/riscv/op_helper.c | 47 +--- target/riscv/translate.c | 290 +++--- 10 files changed, 396 insertions(+), 109 deletions(-)
[Qemu-devel] [PULL 07/10] RISC-V: Add misa.MAFD checks to translate
From: Michael Clark Add misa checks for M, A, F and D extensions and if they are not present generate illegal instructions. This improves emulation accurary for harts with a limited set of extensions. Signed-off-by: Michael Clark Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Palmer Dabbelt --- target/riscv/translate.c | 158 +++ 1 file changed, 158 insertions(+) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index bb80387088e2..b7176cbf98e1 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -291,24 +291,42 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, int rd, int rs1, tcg_gen_and_tl(source1, source1, source2); break; CASE_OP_32_64(OPC_RISC_MUL): +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_mul_tl(source1, source1, source2); break; case OPC_RISC_MULH: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_muls2_tl(source2, source1, source1, source2); break; case OPC_RISC_MULHSU: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} gen_mulhsu(source1, source1, source2); break; case OPC_RISC_MULHU: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_mulu2_tl(source2, source1, source1, source2); break; #if defined(TARGET_RISCV64) case OPC_RISC_DIVW: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_ext32s_tl(source1, source1); tcg_gen_ext32s_tl(source2, source2); /* fall through to DIV */ #endif case OPC_RISC_DIV: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} /* Handle by altering args to tcg_gen_div to produce req'd results: * For overflow: want source1 in source1 and 1 in source2 * For div by zero: want -1 in source1 and 1 in source2 -> -1 result */ @@ -340,11 +358,17 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, int rd, int rs1, break; #if defined(TARGET_RISCV64) case OPC_RISC_DIVUW: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_ext32u_tl(source1, source1); tcg_gen_ext32u_tl(source2, source2); /* fall through to DIVU */ #endif case OPC_RISC_DIVU: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} cond1 = tcg_temp_new(); zeroreg = tcg_const_tl(0); resultopt1 = tcg_temp_new(); @@ -364,11 +388,17 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, int rd, int rs1, break; #if defined(TARGET_RISCV64) case OPC_RISC_REMW: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_ext32s_tl(source1, source1); tcg_gen_ext32s_tl(source2, source2); /* fall through to REM */ #endif case OPC_RISC_REM: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} cond1 = tcg_temp_new(); cond2 = tcg_temp_new(); zeroreg = tcg_const_tl(0); @@ -396,11 +426,17 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, int rd, int rs1, break; #if defined(TARGET_RISCV64) case OPC_RISC_REMUW: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} tcg_gen_ext32u_tl(source1, source1); tcg_gen_ext32u_tl(source2, source2); /* fall through to REMU */ #endif case OPC_RISC_REMU: +if (!has_ext(ctx, RVM)) { +goto do_illegal; +} cond1 = tcg_temp_new(); zeroreg = tcg_const_tl(0); resultopt1 = tcg_temp_new(); @@ -418,6 +454,7 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, int rd, int rs1, tcg_temp_free(zeroreg); tcg_temp_free(resultopt1); break; +do_illegal: default: gen_exception_illegal(ctx); return; @@ -698,13 +735,20 @@ static void gen_fp_load(DisasContext *ctx, uint32_t opc, int rd, switch (opc) { case OPC_RISC_FLW: +if (!has_ext(ctx, RVF)) { +goto do_illegal; +} tcg_gen_qemu_ld_i64(cpu_fpr[rd], t0, ctx->mem_idx, MO_TEUL); /* RISC-V requires NaN-boxing of narrower width floating point values */ tcg_gen_ori_i64(cpu_fpr[rd], cpu_fpr[rd], 0xULL); break; case OPC_RISC_FLD: +if (!has_ext(ctx, RVD)) { +goto do_illegal; +} tcg_gen_qemu_ld_i64(cpu_fpr[rd], t0, ctx->mem_idx, MO_TEQ); break; +do_illegal: default: gen_exception_illegal(ctx); break; @@ -730,11 +774,18 @@ static void gen_fp_store(DisasContext *ctx, uint32_t opc, int rs1, switch (opc) { case OPC_RISC_FSW: +if (!has_ext(ctx, RVF)) { +goto
[Qemu-devel] [PULL 10/10] target/riscv: fix counter-enable checks in ctr()
From: Xi Wang Access to a counter in U-mode is permitted only if the corresponding bit is set in both mcounteren and scounteren. The current code ignores mcounteren and checks scounteren only for U-mode access. Signed-off-by: Xi Wang Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- target/riscv/csr.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index e72fcf1265d4..960d2b0aa951 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -56,9 +56,15 @@ static int fs(CPURISCVState *env, int csrno) static int ctr(CPURISCVState *env, int csrno) { #if !defined(CONFIG_USER_ONLY) -target_ulong ctr_en = env->priv == PRV_U ? env->scounteren : - env->priv == PRV_S ? env->mcounteren : -1U; -if (!(ctr_en & (1 << (csrno & 31 { +uint32_t ctr_en = ~0u; + +if (env->priv < PRV_M) { +ctr_en &= env->mcounteren; +} +if (env->priv < PRV_S) { +ctr_en &= env->scounteren; +} +if (!(ctr_en & (1u << (csrno & 31 { return -1; } #endif -- 2.18.1
[Qemu-devel] [PULL 08/10] RISC-V: Add misa runtime write support
From: Michael Clark This patch adds support for writing misa. misa is validated based on rules in the ISA specification. 'E' is mutually exclusive with all other extensions. 'D' depends on 'F' so 'D' bit is dropped if 'F' is not present. A conservative approach to consistency is taken by flushing the translation cache on misa writes. misa_mask is added to the CPU struct to store the original set of extensions. Signed-off-by: Michael Clark Signed-off-by: Alistair Francis Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.c | 2 +- target/riscv/cpu.h | 4 ++- target/riscv/cpu_bits.h | 11 + target/riscv/csr.c | 54 - 4 files changed, 68 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 28d7e5302fb1..cc3ddc0ae4b5 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -88,7 +88,7 @@ typedef struct RISCVCPUInfo { static void set_misa(CPURISCVState *env, target_ulong misa) { -env->misa = misa; +env->misa_mask = env->misa = misa; } static void set_versions(CPURISCVState *env, int user_ver, int priv_ver) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index a97435bd7b1d..5c2aebf13251 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -86,7 +86,8 @@ so a cpu features bitfield is required, likewise for optional PMP support */ enum { RISCV_FEATURE_MMU, -RISCV_FEATURE_PMP +RISCV_FEATURE_PMP, +RISCV_FEATURE_MISA }; #define USER_VERSION_2_02_0 0x00020200 @@ -118,6 +119,7 @@ struct CPURISCVState { target_ulong user_ver; target_ulong priv_ver; target_ulong misa; +target_ulong misa_mask; uint32_t features; diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index 5439f4719ee5..7afcb2468d80 100644 --- a/target/riscv/cpu_bits.h +++ b/target/riscv/cpu_bits.h @@ -311,10 +311,21 @@ #define MSTATUS32_SD0x8000 #define MSTATUS64_SD0x8000ULL +#define MISA32_MXL 0xC000 +#define MISA64_MXL 0xC000ULL + +#define MXL_RV321 +#define MXL_RV642 +#define MXL_RV128 3 + #if defined(TARGET_RISCV32) #define MSTATUS_SD MSTATUS32_SD +#define MISA_MXL MISA32_MXL +#define MXL_VAL MXL_RV32 #elif defined(TARGET_RISCV64) #define MSTATUS_SD MSTATUS64_SD +#define MISA_MXL MISA64_MXL +#define MXL_VAL MXL_RV64 #endif /* sstatus CSR bits */ diff --git a/target/riscv/csr.c b/target/riscv/csr.c index e2bd374f09ed..e72fcf1265d4 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -332,6 +332,58 @@ static int read_misa(CPURISCVState *env, int csrno, target_ulong *val) return 0; } +static int write_misa(CPURISCVState *env, int csrno, target_ulong val) +{ +if (!riscv_feature(env, RISCV_FEATURE_MISA)) { +/* drop write to misa */ +return 0; +} + +/* 'I' or 'E' must be present */ +if (!(val & (RVI | RVE))) { +/* It is not, drop write to misa */ +return 0; +} + +/* 'E' excludes all other extensions */ +if (val & RVE) { +/* when we support 'E' we can do "val = RVE;" however + * for now we just drop writes if 'E' is present. + */ +return 0; +} + +/* Mask extensions that are not supported by this hart */ +val &= env->misa_mask; + +/* Mask extensions that are not supported by QEMU */ +val &= (RVI | RVE | RVM | RVA | RVF | RVD | RVC | RVS | RVU); + +/* 'D' depends on 'F', so clear 'D' if 'F' is not present */ +if ((val & RVD) && !(val & RVF)) { +val &= ~RVD; +} + +/* Suppress 'C' if next instruction is not aligned + * TODO: this should check next_pc + */ +if ((val & RVC) && (GETPC() & ~3) != 0) { +val &= ~RVC; +} + +/* misa.MXL writes are not supported by QEMU */ +val = (env->misa & MISA_MXL) | (val & ~MISA_MXL); + +/* flush translation cache */ +if (val != env->misa) { +tb_flush(CPU(riscv_env_get_cpu(env))); +} + +env->misa = val; + +return 0; +} + static int read_medeleg(CPURISCVState *env, int csrno, target_ulong *val) { *val = env->medeleg; @@ -810,7 +862,7 @@ static riscv_csr_operations csr_ops[CSR_TABLE_SIZE] = { /* Machine Trap Setup */ [CSR_MSTATUS] = { any, read_mstatus, write_mstatus }, -[CSR_MISA] ={ any, read_misa }, +[CSR_MISA] ={ any, read_misa,write_misa}, [CSR_MIDELEG] = { any, read_mideleg, write_mideleg }, [CSR_MEDELEG] = { any, read_medeleg, write_medeleg }, [CSR_MIE] = { any, read_mie, write_mie }, -- 2.18.1
[Qemu-devel] [PULL 05/10] RISC-V: Add priv_ver to DisasContext
From: Alistair Francis The gen methods should access state from DisasContext. Add priv_ver field to the DisasContext struct. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Palmer Dabbelt --- target/riscv/translate.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 0581b3c1f7d7..35eb6bdfe099 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -43,6 +43,7 @@ typedef struct DisasContext { DisasContextBase base; /* pc_succ_insn points to the instruction following base.pc_next */ target_ulong pc_succ_insn; +target_ulong priv_ver; uint32_t opcode; uint32_t mstatus_fs; uint32_t mem_idx; @@ -1330,7 +1331,7 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc, #ifndef CONFIG_USER_ONLY /* Extract funct7 value and check whether it matches SFENCE.VMA */ if ((opc == OPC_RISC_ECALL) && ((csr >> 5) == 9)) { -if (env->priv_ver == PRIV_VERSION_1_10_0) { +if (ctx->priv_ver == PRIV_VERSION_1_10_0) { /* sfence.vma */ /* TODO: handle ASID specific fences */ gen_helper_tlb_flush(cpu_env); @@ -1384,7 +1385,7 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc, gen_helper_wfi(cpu_env); break; case 0x104: /* SFENCE.VM */ -if (env->priv_ver <= PRIV_VERSION_1_09_1) { +if (ctx->priv_ver <= PRIV_VERSION_1_09_1) { gen_helper_tlb_flush(cpu_env); } else { gen_exception_illegal(ctx); @@ -1854,10 +1855,12 @@ static void decode_opc(CPURISCVState *env, DisasContext *ctx) static void riscv_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) { DisasContext *ctx = container_of(dcbase, DisasContext, base); +CPURISCVState *env = cs->env_ptr; ctx->pc_succ_insn = ctx->base.pc_first; ctx->mem_idx = ctx->base.tb->flags & TB_FLAGS_MMU_MASK; ctx->mstatus_fs = ctx->base.tb->flags & TB_FLAGS_MSTATUS_FS; +ctx->priv_ver = env->priv_ver; ctx->frm = -1; /* unknown rounding mode */ } -- 2.18.1
[Qemu-devel] [PULL 02/10] RISC-V: Mark mstatus.fs dirty
From: Richard Henderson Modifed from Richard Henderson's patch [1] to integrate with the new control and status register implementation. [1] https://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg07034.html Note: the f* CSRs already mark mstatus.FS dirty using env->mstatus |= mstatus.FS so the bug in the first spin of this patch has been fixed in a prior commit. Signed-off-by: Michael Clark Reviewed-by: Michael Clark Signed-off-by: Alistair Francis Co-authored-by: Richard Henderson Co-authored-by: Michael Clark Signed-off-by: Palmer Dabbelt --- target/riscv/csr.c | 12 target/riscv/translate.c | 40 +++- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 5e7e7d16b8b5..571414768992 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -317,18 +317,6 @@ static int write_mstatus(CPURISCVState *env, int csrno, target_ulong val) mstatus = (mstatus & ~mask) | (val & mask); -/* Note: this is a workaround for an issue where mstatus.FS - does not report dirty after floating point operations - that modify floating point state. This workaround is - technically compliant with the RISC-V Privileged - specification as it is legal to return only off, or dirty. - at the expense of extra floating point save/restore. */ - -/* FP is always dirty or off */ -if (mstatus & MSTATUS_FS) { -mstatus |= MSTATUS_FS; -} - int dirty = ((mstatus & MSTATUS_FS) == MSTATUS_FS) | ((mstatus & MSTATUS_XS) == MSTATUS_XS); mstatus = set_field(mstatus, MSTATUS_SD, dirty); diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 3d07d651b60c..0581b3c1f7d7 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -651,6 +651,31 @@ static void gen_store(DisasContext *ctx, uint32_t opc, int rs1, int rs2, tcg_temp_free(dat); } +#ifndef CONFIG_USER_ONLY +/* The states of mstatus_fs are: + * 0 = disabled, 1 = initial, 2 = clean, 3 = dirty + * We will have already diagnosed disabled state, + * and need to turn initial/clean into dirty. + */ +static void mark_fs_dirty(DisasContext *ctx) +{ +TCGv tmp; +if (ctx->mstatus_fs == MSTATUS_FS) { +return; +} +/* Remember the state change for the rest of the TB. */ +ctx->mstatus_fs = MSTATUS_FS; + +tmp = tcg_temp_new(); +tcg_gen_ld_tl(tmp, cpu_env, offsetof(CPURISCVState, mstatus)); +tcg_gen_ori_tl(tmp, tmp, MSTATUS_FS); +tcg_gen_st_tl(tmp, cpu_env, offsetof(CPURISCVState, mstatus)); +tcg_temp_free(tmp); +} +#else +static inline void mark_fs_dirty(DisasContext *ctx) { } +#endif + static void gen_fp_load(DisasContext *ctx, uint32_t opc, int rd, int rs1, target_long imm) { @@ -679,6 +704,8 @@ static void gen_fp_load(DisasContext *ctx, uint32_t opc, int rd, break; } tcg_temp_free(t0); + +mark_fs_dirty(ctx); } static void gen_fp_store(DisasContext *ctx, uint32_t opc, int rs1, @@ -944,6 +971,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, int rs1, int rs2, int rm) { TCGv t0 = NULL; +bool fp_output = true; if (ctx->mstatus_fs == 0) { goto do_illegal; @@ -1006,6 +1034,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } gen_set_gpr(rd, t0); tcg_temp_free(t0); +fp_output = false; break; case OPC_RISC_FCVT_W_S: @@ -1035,6 +1064,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } gen_set_gpr(rd, t0); tcg_temp_free(t0); +fp_output = false; break; case OPC_RISC_FCVT_S_W: @@ -1085,6 +1115,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } gen_set_gpr(rd, t0); tcg_temp_free(t0); +fp_output = false; break; case OPC_RISC_FMV_S_X: @@ -1177,6 +1208,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } gen_set_gpr(rd, t0); tcg_temp_free(t0); +fp_output = false; break; case OPC_RISC_FCVT_W_D: @@ -1206,6 +1238,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } gen_set_gpr(rd, t0); tcg_temp_free(t0); +fp_output = false; break; case OPC_RISC_FCVT_D_W: @@ -1254,6 +1287,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, default: goto do_illegal; } +fp_output = false; break; #if defined(TARGET_RISCV64) @@ -1271,7 +1305,11 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, tcg_temp_free(t0); } gen_exception_illegal(ctx); -break; +return; +} + +if (fp_output) { +mark_fs_dirty(ctx); } } -- 2.18.1
[Qemu-devel] [PULL 06/10] RISC-V: Add misa to DisasContext
From: Michael Clark gen methods should access state from DisasContext. Add misa field to the DisasContext struct and remove CPURISCVState argument from all gen methods. Signed-off-by: Michael Clark Reviewed-by: Richard Henderson Signed-off-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/translate.c | 75 +--- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 35eb6bdfe099..bb80387088e2 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -46,6 +46,7 @@ typedef struct DisasContext { target_ulong priv_ver; uint32_t opcode; uint32_t mstatus_fs; +uint32_t misa; uint32_t mem_idx; /* Remember the rounding mode encoded in the previous fp instruction, which we have already installed into env->fp_status. Or -1 for @@ -75,6 +76,11 @@ static const int tcg_memop_lookup[8] = { #define CASE_OP_32_64(X) case X #endif +static inline bool has_ext(DisasContext *ctx, uint32_t ext) +{ +return ctx->misa & ext; +} + static void generate_exception(DisasContext *ctx, int excp) { tcg_gen_movi_tl(cpu_pc, ctx->base.pc_next); @@ -506,14 +512,13 @@ static void gen_arith_imm(DisasContext *ctx, uint32_t opc, int rd, tcg_temp_free(source1); } -static void gen_jal(CPURISCVState *env, DisasContext *ctx, int rd, -target_ulong imm) +static void gen_jal(DisasContext *ctx, int rd, target_ulong imm) { target_ulong next_pc; /* check misaligned: */ next_pc = ctx->base.pc_next + imm; -if (!riscv_has_ext(env, RVC)) { +if (!has_ext(ctx, RVC)) { if ((next_pc & 0x3) != 0) { gen_exception_inst_addr_mis(ctx); return; @@ -527,8 +532,8 @@ static void gen_jal(CPURISCVState *env, DisasContext *ctx, int rd, ctx->base.is_jmp = DISAS_NORETURN; } -static void gen_jalr(CPURISCVState *env, DisasContext *ctx, uint32_t opc, - int rd, int rs1, target_long imm) +static void gen_jalr(DisasContext *ctx, uint32_t opc, int rd, int rs1, + target_long imm) { /* no chaining with JALR */ TCGLabel *misaligned = NULL; @@ -540,7 +545,7 @@ static void gen_jalr(CPURISCVState *env, DisasContext *ctx, uint32_t opc, tcg_gen_addi_tl(cpu_pc, cpu_pc, imm); tcg_gen_andi_tl(cpu_pc, cpu_pc, (target_ulong)-2); -if (!riscv_has_ext(env, RVC)) { +if (!has_ext(ctx, RVC)) { misaligned = gen_new_label(); tcg_gen_andi_tl(t0, cpu_pc, 0x2); tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0x0, misaligned); @@ -565,8 +570,8 @@ static void gen_jalr(CPURISCVState *env, DisasContext *ctx, uint32_t opc, tcg_temp_free(t0); } -static void gen_branch(CPURISCVState *env, DisasContext *ctx, uint32_t opc, - int rs1, int rs2, target_long bimm) +static void gen_branch(DisasContext *ctx, uint32_t opc, int rs1, int rs2, + target_long bimm) { TCGLabel *l = gen_new_label(); TCGv source1, source2; @@ -603,7 +608,7 @@ static void gen_branch(CPURISCVState *env, DisasContext *ctx, uint32_t opc, gen_goto_tb(ctx, 1, ctx->pc_succ_insn); gen_set_label(l); /* branch taken */ -if (!riscv_has_ext(env, RVC) && ((ctx->base.pc_next + bimm) & 0x3)) { +if (!has_ext(ctx, RVC) && ((ctx->base.pc_next + bimm) & 0x3)) { /* misaligned */ gen_exception_inst_addr_mis(ctx); } else { @@ -1314,8 +1319,8 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } } -static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc, - int rd, int rs1, int csr) +static void gen_system(DisasContext *ctx, uint32_t opc, int rd, int rs1, + int csr) { TCGv source1, csr_store, dest, rs1_pass, imm_rs1; source1 = tcg_temp_new(); @@ -1361,7 +1366,7 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc, gen_exception_illegal(ctx); break; case 0x102: /* SRET */ -if (riscv_has_ext(env, RVS)) { +if (has_ext(ctx, RVS)) { gen_helper_sret(cpu_pc, cpu_env, cpu_pc); tcg_gen_exit_tb(NULL, 0); /* no chaining */ ctx->base.is_jmp = DISAS_NORETURN; @@ -1506,7 +1511,7 @@ static void decode_RV32_64C0(DisasContext *ctx) } } -static void decode_RV32_64C1(CPURISCVState *env, DisasContext *ctx) +static void decode_RV32_64C1(DisasContext *ctx) { uint8_t funct3 = extract32(ctx->opcode, 13, 3); uint8_t rd_rs1 = GET_C_RS1(ctx->opcode); @@ -1526,7 +1531,7 @@ static void decode_RV32_64C1(CPURISCVState *env, DisasContext *ctx) GET_C_IMM(ctx->opcode)); #else /* C.JAL(RV32) -> jal x1, offset[11:1] */ -gen_jal(env, ctx, 1, GET_C_J_IMM(ctx->opcode)); +gen_jal(ctx, 1,
Re: [Qemu-devel] [PULL v2 00/11] check-softfloat, fp-bench and clang compile fixes
I'll add an ignore when I send the next fpu series. Thanks. On Fri, 1 Feb 2019, 18:44 Eric Blake On 1/23/19 5:42 AM, Alex Bennée wrote: > > The following changes since commit > 952bc8b3c2cbba78261923a1e8ca55cda261dee9: > > > > Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-01-21' > into staging (2019-01-22 17:56:21 +) > > > > are available in the Git repository at: > > > > https://github.com/stsquad/qemu.git tags/pull-fpu-next-230119-2 > > > > for you to fetch changes up to 7617010250822677348af2bd98f048be10e7f334: > > > > tests/Makefile: add check-softfloat rule (2019-01-23 08:30:01 +) > > > > > > Some more softfloat/fpu fixes > > > >- make check-softfloat > >- fixes for fp-bench > >- workaround broken host fma > >- compile fix for s390x/clang > >- fixed for bigendian (v2) > >- minor makefile tweaks (v2) > > I think this series is the reason that an in-tree 'make && make check && > git status' is now showing a bunch of untracked files: > > tests/fp/add.out > tests/fp/div.out > tests/fp/eq.out > ... > > I suggest a followup patch to amend a .gitignore for tests/fp/*.out > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org > >
[Qemu-devel] [PULL 03/10] RISC-V: Implement mstatus.TSR/TW/TVM
From: Michael Clark This adds the necessary minimum to support S-mode virtualization for priv ISA >= v1.10 Signed-off-by: Michael Clark Signed-off-by: Alistair Francis Co-authored-by: Matthew Suozzo Co-authored-by: Michael Clark Signed-off-by: Palmer Dabbelt --- target/riscv/csr.c | 17 + target/riscv/op_helper.c | 25 + 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 571414768992..390d3a9a5634 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -305,7 +305,8 @@ static int write_mstatus(CPURISCVState *env, int csrno, target_ulong val) } mask = MSTATUS_SIE | MSTATUS_SPIE | MSTATUS_MIE | MSTATUS_MPIE | MSTATUS_SPP | MSTATUS_FS | MSTATUS_MPRV | MSTATUS_SUM | -MSTATUS_MPP | MSTATUS_MXR; +MSTATUS_MPP | MSTATUS_MXR | MSTATUS_TVM | MSTATUS_TSR | +MSTATUS_TW; } /* silenty discard mstatus.mpp writes for unsupported modes */ @@ -642,7 +643,11 @@ static int read_satp(CPURISCVState *env, int csrno, target_ulong *val) if (!riscv_feature(env, RISCV_FEATURE_MMU)) { *val = 0; } else if (env->priv_ver >= PRIV_VERSION_1_10_0) { -*val = env->satp; +if (env->priv == PRV_S && get_field(env->mstatus, MSTATUS_TVM)) { +return -1; +} else { +*val = env->satp; +} } else { *val = env->sptbr; } @@ -663,8 +668,12 @@ static int write_satp(CPURISCVState *env, int csrno, target_ulong val) validate_vm(env, get_field(val, SATP_MODE)) && ((val ^ env->satp) & (SATP_MODE | SATP_ASID | SATP_PPN))) { -tlb_flush(CPU(riscv_env_get_cpu(env))); -env->satp = val; +if (env->priv == PRV_S && get_field(env->mstatus, MSTATUS_TVM)) { +return -1; +} else { +tlb_flush(CPU(riscv_env_get_cpu(env))); +env->satp = val; +} } return 0; } diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index 81bd1a77ea90..77c79ba36e0b 100644 --- a/target/riscv/op_helper.c +++ b/target/riscv/op_helper.c @@ -82,6 +82,11 @@ target_ulong helper_sret(CPURISCVState *env, target_ulong cpu_pc_deb) do_raise_exception_err(env, RISCV_EXCP_INST_ADDR_MIS, GETPC()); } +if (env->priv_ver >= PRIV_VERSION_1_10_0 && +get_field(env->mstatus, MSTATUS_TSR)) { +do_raise_exception_err(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); +} + target_ulong mstatus = env->mstatus; target_ulong prev_priv = get_field(mstatus, MSTATUS_SPP); mstatus = set_field(mstatus, @@ -125,16 +130,28 @@ void helper_wfi(CPURISCVState *env) { CPUState *cs = CPU(riscv_env_get_cpu(env)); -cs->halted = 1; -cs->exception_index = EXCP_HLT; -cpu_loop_exit(cs); +if (env->priv == PRV_S && +env->priv_ver >= PRIV_VERSION_1_10_0 && +get_field(env->mstatus, MSTATUS_TW)) { +do_raise_exception_err(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); +} else { +cs->halted = 1; +cs->exception_index = EXCP_HLT; +cpu_loop_exit(cs); +} } void helper_tlb_flush(CPURISCVState *env) { RISCVCPU *cpu = riscv_env_get_cpu(env); CPUState *cs = CPU(cpu); -tlb_flush(cs); +if (env->priv == PRV_S && +env->priv_ver >= PRIV_VERSION_1_10_0 && +get_field(env->mstatus, MSTATUS_TVM)) { +do_raise_exception_err(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); +} else { +tlb_flush(cs); +} } #endif /* !CONFIG_USER_ONLY */ -- 2.18.1
Re: [Qemu-devel] [PR RFC] RISC-V Patches for 3.2, Part 3
On Wed, 30 Jan 2019 22:39:35 PST (-0800), th...@redhat.com wrote: On 2019-01-30 20:01, Palmer Dabbelt wrote: On Wed, 30 Jan 2019 09:45:33 PST (-0800), ebl...@redhat.com wrote: On 1/30/19 11:35 AM, Palmer Dabbelt wrote: The following changes since commit 5385a5988c8a55bebdc878c05b96648579b5d6e0: hw/virtio/virtio-balloon: zero-initialize the virtio_balloon_config struct (2019-01-21 17:20:36 +) are available in the Git repository at: git://github.com/palmer-dabbelt/qemu.git tags/riscv-for-master-3.2-part3 for you to fetch changes up to 461ab9de46d085a37b0da6f096aadc4e0dda4d4c: target/riscv: fix counter-enable checks in ctr() (2019-01-29 11:33:38 -0800) RISC-V Patches for 3.2, Part 3 There is no 3.2 release; the next release is named 4.0. However, if you don't want to bother with sending a v2 pull request just to fix the merge commit message, that's okay with me. Ah, sorry. I think I'm just going to leave it as is, I'll get it right next time. Also note that you used "PR RFC" in the title ... so not sure whether Peter's scripts will catch this PR as a valid one... It's actually meant not to: my blow is to send out these as a test to see if there's anything wrong, and then if there is to fix it up. I'm less worried about the text of the pull request and more about making sure I didn't screw up a patch, which is the only reason I wasn't worried about picking up your suggested change.
Re: [Qemu-devel] [PR RFC] RISC-V Patches for 3.2, Part 3
On Thu, 31 Jan 2019 01:51:52 PST (-0800), Peter Maydell wrote: On Thu, 31 Jan 2019 at 06:39, Thomas Huth wrote: On 2019-01-30 20:01, Palmer Dabbelt wrote: > On Wed, 30 Jan 2019 09:45:33 PST (-0800), ebl...@redhat.com wrote: >> On 1/30/19 11:35 AM, Palmer Dabbelt wrote: >>> The following changes since commit >>> 5385a5988c8a55bebdc878c05b96648579b5d6e0: >>> >>> hw/virtio/virtio-balloon: zero-initialize the virtio_balloon_config >>> struct (2019-01-21 17:20:36 +) >>> >>> are available in the Git repository at: >>> >>> git://github.com/palmer-dabbelt/qemu.git >>> tags/riscv-for-master-3.2-part3 >>> >>> for you to fetch changes up to 461ab9de46d085a37b0da6f096aadc4e0dda4d4c: >>> >>> target/riscv: fix counter-enable checks in ctr() (2019-01-29 >>> 11:33:38 -0800) >>> >>> >>> RISC-V Patches for 3.2, Part 3 >> >> There is no 3.2 release; the next release is named 4.0. However, if you >> don't want to bother with sending a v2 pull request just to fix the >> merge commit message, that's okay with me. > > Ah, sorry. I think I'm just going to leave it as is, I'll get it right > next time. Also note that you used "PR RFC" in the title ... so not sure whether Peter's scripts will catch this PR as a valid one... My mail filter finds these RFC pullrequests, yes. I'm then relying on my manual brain to not actually apply them. (If it's a slow day I might do a test merge on them, but usually my queue is full enough that I don't get to them before the real PR appears.) Ah, OK -- do you want me to do something else?
Re: [Qemu-devel] [PATCH 0/2] decodetree: Support for variable-length ISAs
On Fri, 01 Feb 2019 06:08:49 +0900, Richard Henderson wrote: > > I'm not sure how much simplication could be had for "simple" > variable-length ISAs like ARM thumb2 or RISC-V. > > But the recently posted RX port is more complicated than those. > For me, what makes RX more difficult is that there is no easy > test of the first N bits to determine the length of the insn. > > I put together a starting point for the RX decode. I'm sure > there are a few mistakes, but it's close enough to see how the > decoding might work. > > I have chosen to have this RX decoder only consider the "base" > instruction, without the "extra" bits like the immediate associated > with the LI field, or the memory displacement associated with > the LD field. > > The new decode_load function reads the bytes of the insn with > minimal decoding and no further validation of invalid insns; > that is left for the main decode function. I tried that several MOV instructions can be decoded correctly. I will confirm the rest of the instructions from now, but I think that there is no problem because it is not as complicated as MOV. > This is expecting a helper function that assembles the bytes. > While I say I rule out Thumb2+RISC-V above, they are not implausible > examples. These have uint16_t granularity, and I didn't want to > assume the endianness of the granules. > > But for RX, with byte granularity, > > uint32_t decode_load_bytes(DisasContext *ctx, uint32_t insn, >int i, int n) > { > while (++i <= n) { > uint8_t b = cpu_ldub_code(ctx->env, ctx->base.pc_next++); > insn |= b << (32 - i * 8); > } > return insn; > } > > For the actual port submission, I would break up the translation > into small bits. Just a few lines into the decode file and the > associated functions within translate.c. > OK. Too many thanks. > > r~ > > > Richard Henderson (2): > decodetree: Initial support for variable-length ISAs > decodetree: Expand a decode_load function > > scripts/decodetree.py | 213 +++--- > 1 file changed, 200 insertions(+), 13 deletions(-) > > --- > > cd dsp > dsp > rs >rd rs >rd imm > rd rs rs2 > rd imm rs2 >rd rs ld mi >rs ld mi imm >rs ld mi rs2 > > > > %b2_r_0 16:4 > %b2_li_2 18:2 !function=li > %b2_li_8 24:2 !function=li > %b2_dsp5_323:4 19:1 > > @b2_rds rd:4 rs=%b2_r_0 > @b2_rds_li rd:4 rs2=%b2_r_0 imm=%b2_li_8 > @b2_rds_uimm4 imm:4 rd:4 rs2=%b2_r_0 > @b2_rds_imm5 ... imm:5 rd:4 rs2=%b2_r_0 > @b2_rd_rs_li rs2:4 rd:4 imm=%b2_li_8 > @b2_rd_ld_ub .. ld:2 rs:4 rd:4 mi=4 > @b2_ld_imm3 .. ld:2 rs:4 . imm:3mi=4 > > > > %b3_r_0 8:4 > %b3_li_10 18:2 !function=li > %b3_dsp5_823:1 16:4 > > @b3_rd_rs rs:4 rd:4 > @b3_rd_li rd:4 \ >rs2=%b3_r_0 imm=%b3_li_10 > @b3_rd_ld mi:2 ld:2 rs:4 rd:4 > @b3_rd_ld_ub .. ld:2 rs:4 rd:4 mi=4 > @b3_rd_ld_ul .. ld:2 rs:4 rd:4 mi=2 > @b3_rd_rs_rs2 rd:4 rs:4 rs2:4 > @b3_ld_rs2 .. ld:2 rs:4 rs2:4 > @b3_rds_imm5 ... imm:5 rd:4 rs2=%b3_r_0 > @b3_rd_rs_imm5 ... imm:5 rs2:4 rd:4 > > > > %b4_li_18 18:2 !function=li > > @b4_rd_ldmi mi:2 ld:2 rs:4 rd:4 > > > > ABS_rr0111 1110 0010 @b2_rds > ABS_rr 1100 @b3_rd_rs > > ADC_ri 1101 0111 ..00 @b3_rd_li > ADC_rr 1100 1011 @b3_rd_rs > # Note only mi==2 allowed. > ADC_rl 0110 ..10 00.. 0010 @b4_rd_ldmi > > ADD_rri 0110 0010 @b2_rds_uimm4 > ADD_rri 0111 00.. @b2_rd_rs_li > ADD_rl0100 10.. @b2_rd_ld_ub > ADD_rl 0110 ..00 10.. @b3_rd_ld > ADD_rrr 0010 @b3_rd_rs_rs2 > > AND_rri 0110 0100 @b2_rds_uimm4 > AND_rri 0111 01.. 0010 @b2_rds_li > AND_rl0101 00.. @b2_rd_ld_ub > AND_rl 0110 ..01 00.. @b3_rd_ld > AND_rrr 0100 @b3_rd_rs_rs2 > > BCLR_li 00.. 1...